arpwatch/rc.arpwatch

Fri, 15 Oct 2010 19:06:09 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 15 Oct 2010 19:06:09 +0200
changeset 263
f4a0b439d0fb
child 571
175768f4868b
permissions
-rw-r--r--

Correct shared library and plugin link logic, as well as informal text.
Update file server URL, update build resource estimations, correct RPATH
logic, allow for qmake(1) static to shared library changes via CONFIG
argument, correct documentation broken title and index links, correct
shared library install path, install only one set of (correct) plugins,
install the designer shared library (as required by QtCreator), announce
features related to shared linking using qmake(1), and correclty
substitute hard coded paths in prl and la library files.

michael@64 1 #!@l_prefix@/bin/openpkg rc
michael@64 2 ##
michael@64 3 ## rc.arpwatch -- runcommands
michael@64 4 ##
michael@64 5
michael@64 6 %config
michael@64 7 arpwatch_enable="$openpkg_rc_def"
michael@64 8 arpwatch_log_prolog="true"
michael@64 9 arpwatch_log_epilog="true"
michael@64 10 arpwatch_log_numfiles="10"
michael@64 11 arpwatch_log_minsize="1M"
michael@64 12 arpwatch_log_complevel="9"
michael@64 13 arpwatch_iface="-i lo0"
michael@64 14 arpwatch_ipnet="-n 127.0.0.0/8"
michael@64 15
michael@64 16 %common
michael@64 17 arpwatch_pidfile="@l_prefix@/var/arpwatch/run/arpwatch.pid"
michael@64 18 arpwatch_signal () {
michael@64 19 [ -f $arpwatch_pidfile ] && kill -$1 `cat $arpwatch_pidfile`
michael@64 20 }
michael@64 21
michael@64 22 %status -u @l_susr@ -o
michael@64 23 arpwatch_usable="no"
michael@64 24 arpwatch_active="no"
michael@64 25 rcService arpwatch enable yes && \
michael@64 26 arpwatch_usable="yes"
michael@64 27 rcService arpwatch enable yes && \
michael@64 28 arpwatch_signal 0 && arpwatch_active="yes"
michael@64 29 echo "arpwatch_enable=\"$arpwatch_enable\""
michael@64 30 echo "arpwatch_usable=\"$arpwatch_usable\""
michael@64 31 echo "arpwatch_active=\"$arpwatch_active\""
michael@64 32
michael@64 33 %start -u @l_susr@
michael@64 34 rcService arpwatch enable yes || exit 0
michael@64 35 rcService arpwatch active yes && exit 0
michael@64 36 @l_prefix@/sbin/arpwatch \
michael@64 37 $arpwatch_iface \
michael@64 38 $arpwatch_ipnet \
michael@64 39 >$arpwatch_pidfile 2>&1
michael@64 40
michael@64 41 %stop -u @l_susr@
michael@64 42 rcService arpwatch enable yes || exit 0
michael@64 43 rcService arpwatch active no && exit 0
michael@64 44 arpwatch_signal TERM
michael@64 45
michael@64 46 %restart -u @l_susr@
michael@64 47 rcService arpwatch enable yes || exit 0
michael@64 48 rcService arpwatch active no && exit 0
michael@64 49 rc arpwatch stop
michael@64 50 sleep 2
michael@64 51 rc arpwatch start
michael@64 52
michael@64 53 %reload -u @l_susr@
michael@64 54 rcService arpwatch enable yes || exit 0
michael@64 55 rcService arpwatch active no && exit 0
michael@64 56 arpwatch_signal HUP
michael@64 57
michael@64 58 %daily -u @l_susr@
michael@64 59 rcService arpwatch enable yes || exit 0
michael@64 60 shtool rotate -f \
michael@64 61 -n ${arpwatch_log_numfiles} -s ${arpwatch_log_minsize} -d \
michael@64 62 -z ${arpwatch_log_complevel} -o @l_susr@ -g @l_mgrp@ -m 644 \
michael@64 63 -P "${arpwatch_log_prolog}" \
michael@64 64 -E "${arpwatch_log_epilog}; rc arpwatch restart" \
michael@64 65 @l_prefix@/var/arpwatch/log/arpwatch.log \
michael@64 66 @l_prefix@/var/arpwatch/log/arpsnmp.log

mercurial