OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [email protected] Module: openpkg-src Date: 10-Feb-2009 09:43:39 Branch: HEAD Handle: 2009021008433900 Modified files: openpkg-src/whoson rc.whoson whoson.spec Log: improve run-command script (submitted by Bill Campell) Summary: Revision Changes Path 1.15 +18 -7 openpkg-src/whoson/rc.whoson 1.40 +1 -1 openpkg-src/whoson/whoson.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/whoson/rc.whoson ============================================================================ $ cvs diff -u -r1.14 -r1.15 rc.whoson --- openpkg-src/whoson/rc.whoson 25 Aug 2006 19:20:18 -0000 1.14 +++ openpkg-src/whoson/rc.whoson 10 Feb 2009 08:43:39 -0000 1.15 @@ -13,25 +13,36 @@ %common whoson_pidfile="@l_prefix@/var/whoson/whoson.pid" + whoson_signal () { + [ -f $whoson_pidfile ] && kill -$1 `cat $whoson_pidfile` + } -%start -u @l_susr@ +%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 -u @l_susr@ +%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 - kill -TERM `cat $whoson_pidfile` - sleep 2 - rm -f $whoson_pidfile 2>/dev/null || true - @l_prefix@/sbin/whosond >$whoson_pidfile - exit 0 + rcService whoson active no && exit 0 + rc whoson stop start %daily -u @l_susr@ rcService whoson enable yes || exit 0 @@ . patch -p0 <<'@@ .' Index: openpkg-src/whoson/whoson.spec ============================================================================ $ cvs diff -u -r1.39 -r1.40 whoson.spec --- openpkg-src/whoson/whoson.spec 17 Jan 2008 18:46:56 -0000 1.39 +++ openpkg-src/whoson/whoson.spec 10 Feb 2009 08:43:39 -0000 1.40 @@ -32,7 +32,7 @@ Group: Mail License: GPL Version: 2.04 -Release: 20080117 +Release: 20090210 # package options %option with_fsl yes @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List [email protected]
