head 1.15; access; symbols OPENPKG_E1_MP_HEAD:1.14 OPENPKG_E1_MP:1.14 OPENPKG_E1_MP_2_STABLE:1.13.14.1 OPENPKG_E1_FP:1.13.14.1 OPENPKG_2_STABLE_MP:1.14 OPENPKG_2_STABLE_20061018:1.13.14.1 OPENPKG_2_STABLE_20060622:1.13 OPENPKG_2_STABLE:1.13.0.14 OPENPKG_2_STABLE_BP:1.13 OPENPKG_2_5_RELEASE:1.13 OPENPKG_2_5_SOLID:1.13.0.12 OPENPKG_2_5_SOLID_BP:1.13 OPENPKG_2_4_RELEASE:1.13 OPENPKG_2_4_SOLID:1.13.0.10 OPENPKG_2_4_SOLID_BP:1.13 OPENPKG_CW_FP:1.13 OPENPKG_2_3_RELEASE:1.13 OPENPKG_2_3_SOLID:1.13.0.8 OPENPKG_2_3_SOLID_BP:1.13 OPENPKG_2_2_RELEASE:1.13 OPENPKG_2_2_SOLID:1.13.0.6 OPENPKG_2_2_SOLID_BP:1.13 OPENPKG_2_1_RELEASE:1.13 OPENPKG_2_1_SOLID:1.13.0.4 OPENPKG_2_1_SOLID_BP:1.13 OPENPKG_2_0_RELEASE:1.13 OPENPKG_2_0_SOLID:1.13.0.2 OPENPKG_2_0_SOLID_BP:1.13 OPENPKG_1_3_RELEASE:1.12.2.1 OPENPKG_1_3_SOLID:1.12.2.1.0.2 OPENPKG_1_3_SOLID_BP:1.12.2.1 OPENPKG_1_STABLE:1.12.0.2 OPENPKG_1_STABLE_MP:1.12; locks; strict; comment @# @; 1.15 date 2009.02.10.08.43.39; author rse; state Exp; branches; next 1.14; commitid ZU28as072t34JRBt; 1.14 date 2006.08.25.19.20.18; author rse; state Exp; branches; next 1.13; commitid Tvsj1UyQ8rQ89gKr; 1.13 date 2003.11.27.14.10.04; author ms; state Exp; branches 1.13.14.1; next 1.12; 1.12 date 2003.07.22.08.11.18; author rse; state Exp; branches 1.12.2.1; next 1.11; 1.11 date 2003.07.21.08.40.57; author thl; state Exp; branches; next 1.10; 1.10 date 2003.07.19.17.06.42; author rse; state Exp; branches; next 1.9; 1.9 date 2003.07.17.21.35.20; author thl; state Exp; branches; next 1.8; 1.8 date 2003.07.10.07.51.20; author rse; state Exp; branches; next 1.7; 1.7 date 2003.07.07.22.03.22; author thl; state Exp; branches; next 1.6; 1.6 date 2003.07.07.21.54.36; author thl; state Exp; branches; next 1.5; 1.5 date 2003.06.28.15.10.10; author rse; state Exp; branches; next 1.4; 1.4 date 2003.06.24.16.10.20; author ms; state Exp; branches; next 1.3; 1.3 date 2003.06.24.13.29.15; author thl; state Exp; branches; next 1.2; 1.2 date 2003.06.24.12.08.16; author thl; state Exp; branches; next 1.1; 1.1 date 2003.04.15.14.57.28; author mlelstv; state Exp; branches; next ; 1.13.14.1 date 2006.10.16.14.57.56; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; 1.12.2.1 date 2003.07.28.11.55.35; author rse; state Exp; branches; next ; desc @@ 1.15 log @improve run-command script (submitted by Bill Campell) @ text @#!@@l_prefix@@/bin/openpkg rc ## ## rc.whoson -- Run-Commands ## %config whoson_enable="$openpkg_rc_def" whoson_log_prolog="true" whoson_log_epilog="true" whoson_log_numfiles="10" whoson_log_minsize="1M" whoson_log_complevel="9" %common whoson_pidfile="@@l_prefix@@/var/whoson/whoson.pid" whoson_signal () { [ -f $whoson_pidfile ] && kill -$1 `cat $whoson_pidfile` } %status -u @@l_susr@@ -o whoson_usable="unknown" whoson_active="no" rcService whoson enable yes && \ whoson_signal 0 && whoson_active="yes" echo "whoson_enable=\"$whoson_enable\"" echo "whoson_usable=\"$whoson_usable\"" echo "whoson_active=\"$whoson_active\"" %start -p 200 -u @@l_susr@@ rcService whoson enable yes || exit 0 rcService whoson active yes && exit 0 @@l_prefix@@/sbin/whosond >$whoson_pidfile exit 0 %stop -p 910 -u @@l_susr@@ rcService whoson enable yes || exit 0 rcService whoson active no && exit 0 kill -TERM `cat $whoson_pidfile` rm -f $whoson_pidfile 2>/dev/null || true exit 0 %restart -u @@l_susr@@ rcService whoson enable yes || exit 0 rcService whoson active no && exit 0 rc whoson stop start %daily -u @@l_susr@@ rcService whoson enable yes || exit 0 shtool rotate -f \ -n ${whoson_log_numfiles} -s ${whoson_log_minsize} -d \ -z ${whoson_log_complevel} -o @@l_rusr@@ -g @@l_rgrp@@ -m 644 \ -P "${whoson_log_prolog}" \ -E "${whoson_log_epilog}" \ @@l_prefix@@/var/whoson/log/whosond.log @ 1.14 log @replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality @ text @d16 3 d20 10 a29 1 %start -u @@l_susr@@ d31 1 d35 1 a35 1 %stop -u @@l_susr@@ d37 1 d44 2 a45 5 kill -TERM `cat $whoson_pidfile` sleep 2 rm -f $whoson_pidfile 2>/dev/null || true @@l_prefix@@/sbin/whosond >$whoson_pidfile exit 0 @ 1.13 log @correct removal of pid files @ text @d1 1 a1 1 #!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc @ 1.13.14.1 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @d1 1 a1 1 #!@@l_prefix@@/bin/openpkg rc @ 1.12 log @cleanup the priority: move 200 to 500 and because 500 is default just ommit it; fix DNS/NTP/etc. dependencies @ text @d25 1 a25 1 rm -f $whoson_pidfile d32 1 a32 1 rm -f $whoson_pidfile @ 1.12.2.1 log @MFC: whoson package now became PLUS @ text @@ 1.11 log @PR#210: shtool options space before argument @ text @d17 1 a17 1 %start -p 200 -u @@l_susr@@ d22 1 a22 1 %stop -p 200 -u @@l_susr@@ @ 1.10 log @replace opXXXX with rcXXXX (PR#207) @ text @d39 2 a40 2 -n${whoson_log_numfiles} -s${whoson_log_minsize} -d \ -z${whoson_log_complevel} -o@@l_rusr@@ -g@@l_rgrp@@ -m644 \ @ 1.9 log @migrate opServiceEnabled to opService ... enable yes; use new bootstrap feature and apply opService short circuit to %env @ text @d18 1 a18 1 opService whoson enable yes || exit 0 d23 1 a23 1 opService whoson enable yes || exit 0 d29 1 a29 1 opService whoson enable yes || exit 0 d37 1 a37 1 opService whoson enable yes || exit 0 @ 1.8 log @use new openpkg_rc_def variable in run-command scripts for allowing the admin to change the global default for xxx_enable @ text @d18 1 a18 1 opServiceEnabled whoson || exit 0 d23 1 a23 1 opServiceEnabled whoson || exit 0 d29 1 a29 1 opServiceEnabled whoson || exit 0 d37 1 a37 1 opServiceEnabled whoson || exit 0 @ 1.7 log @rclint police: fix leading tabs @ text @d7 1 a7 1 whoson_enable="yes" @ 1.6 log @rclint police: fix mandatory/wished trailing blank line missing @ text @d19 1 a19 1 @@l_prefix@@/sbin/whosond >$whoson_pidfile d33 1 a33 1 @@l_prefix@@/sbin/whosond >$whoson_pidfile @ 1.5 log @remove tabs; make %restart similar to %start; require susr; remove extra comment @ text @d44 1 @ 1.4 log @Synchronize spec file substitution with recent rc file changes @ text @d7 1 a7 1 whoson_enable="yes" d15 1 a15 1 whoson_pidfile="@@l_prefix@@/var/whoson/whoson.pid" d18 1 a18 1 opServiceEnabled whoson || exit 0 d20 1 a20 1 exit 0 d23 1 a23 1 opServiceEnabled whoson || exit 0 d26 1 a26 1 exit 0 d29 1 a29 1 opServiceEnabled whoson || exit 0 d33 2 a34 1 @@l_prefix@@/sbin/whosond d36 1 a36 1 %daily -u @@l_rusr@@ a37 2 # rotate logfile @ 1.3 log @add/unify log file trimming @ text @d35 1 a35 1 %daily -u @@l_susr@@ @ 1.2 log @cosmetics: align/fix/unify rc header comment @ text @d8 5 d35 10 @ 1.1 log @new package: whoson 2.02a (WHOSON daemon for POP before SMTP) @ text @d3 1 a3 1 ## rc.whoson -- Whoson Administration Run-Commands @