diff options
author | root <root@dgi-huset.dk> | 2012-04-10 00:53:38 +0200 |
---|---|---|
committer | root <root@dgi-huset.dk> | 2012-04-10 00:53:38 +0200 |
commit | b8ab1ccea83bc2d8f99a7df8e6ba10c5d2c71740 (patch) | |
tree | b0f4101bd0219057b1d8efacd8abcf8682792a4f | |
parent | 6e0c34caad982aea1a6ad874589e04eb34857aa9 (diff) |
Modernize local flowscan SysV init script.
-rwxr-xr-x | init.d/local-flowscan | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/init.d/local-flowscan b/init.d/local-flowscan index 171e20f..f6eeecb 100755 --- a/init.d/local-flowscan +++ b/init.d/local-flowscan @@ -1,10 +1,12 @@ #!/bin/sh -e -# -# flowscan Transforms Cisco netflow files into rrd files. -# -# chkconfig: 345 20 20 -# -# description: Start / stop the netflow recorder +### BEGIN INIT INFO +# Provides: flowscan +# Required-Start: $local_fs $remote_fs $syslog $time +# Required-Stop: $local_fs $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: transforms Cisco netflow files into rrd files +### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/flowscan @@ -16,7 +18,7 @@ test -f $CONFIG || exit 0 startstop() { local background= - [[ "$1" != "--start" ]] || background="--background" + [ "$1" != "--start" ] || background="--background" start-stop-daemon "$@" $background --make-pidfile --name ${DAEMON##*/} \ --pidfile="/var/run/${DAEMON##*/}.pid" --startas "$DAEMON" } @@ -33,8 +35,9 @@ case "$1" in echo "${DAEMON##*/}." ;; restart|force-reload) - echo -n "Reloading $DESC: " + echo -n "Restarting $DESC: " startstop --stop --oknodo --quiet + sleep 3 startstop --start echo "${DAEMON##*/}." ;; |