mrtg/rc.mrtg

Sat, 03 Oct 2009 16:18:52 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Oct 2009 16:18:52 +0200
changeset 220
a6cd892638c1
parent 140
d51e263e607b
permissions
-rw-r--r--

Update version, adjust corresponding buildconf, and correct logic.
1: Make minor corrections and improvements to scripts patch logic.
2: Upgrade to most recent stable release version 3.0.2.
3: Force selection of a single db backend, as multiple ones never
were supported (changing 'with_db<end>' identifiers accordingly.)
4: Unfortunately add gawk requirement although only partly needed.
5: Add openssl::with_threads requirement to solve strange and hard
to debug problems on Solaris leading to connection failures:

'host-dir JobId 0: Error: openssl.c:86 Connect failure: ERR=error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number'

and

'host-dir JobId 40: Fatal error: TLS negotiation failed with FD at "back1.host.com:9102"'

     1 #!@l_prefix@/bin/openpkg rc
     2 ##
     3 ##  rc.mrtg -- Run-Commands
     4 ##
     6 %config
     7     mrtg_enable="$openpkg_rc_def"
     8     mrtg_sumlog="no"
     9     mrtg_summin="10"
    10     mrtg_sumail=""
    11     mrtg_sumpat="<[Hh][1-9]>([Tt]raffic[^<]*)</[Hh][1-9]>"
    13 %common
    14     mrtg_etcdir="@l_prefix@/etc/mrtg"
    15     mrtg_vardir="@l_prefix@/var/mrtg"
    16     mrtg_webdir="@l_prefix@/web/mrtg"
    18 %quarterly -u @l_susr@
    19     rcService mrtg enable yes || exit 0
    20     export LANG=C
    21     @l_prefix@/bin/mrtg \
    22         --pid-file=$mrtg_vardir/mrtg.pid \
    23         --lock-file=$mrtg_vardir/mrtg.lock \
    24         --confcache-file=$mrtg_vardir/mrtg.cache \
    25         $mrtg_etcdir/mrtg.cfg \
    26         && echo >>$mrtg_vardir/mrtg.log
    28 %monthly -u @l_musr@
    29     rcService mrtg enable yes || exit 0
    30     rcVarIsYes mrtg_sumlog || exit 0
    31     @l_prefix@/bin/mrtg-traffic-sum \
    32         --min $mrtg_summin \
    33         --catch $mrtg_sumpat \
    34         $mrtg_etcdir/mrtg.cfg \
    35         >>$mrtg_vardir/mrtg.log
    36     if [ ".$mrtg_sumail" != . ]; then
    37         @l_prefix@/bin/mrtg-traffic-sum \
    38             --min $mrtg_summin \
    39             --email $mrtg_sumail \
    40             --catch $mrtg_sumpat \
    41             $mrtg_etcdir/mrtg.cfg
    42     fi

mercurial