Codebase list ps-watcher / 6d3ebb2
adjust init script since daemon supports writing pidfiles Jan Wagner 16 years ago
3 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
44 * change Priority to extra since libconfig-inifiles-perl is also extra and
55 we depend on it
66 * remove whitespaces trailing whitespaces from changelog
7 * add dpatch infrastructure
8 * add 01_add_pidfile_support.dpatch to implement writing pidfiles into the
9 daemon
10 * adjust init script since the daemon supports writing pidfiles
711
812 -- Jan Wagner <waja@cyconet.org> Sun, 09 Dec 2007 23:12:51 +0100
913
6060 echo -n "Starting $DESC: "
6161 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
6262 --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
63 ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
6463 echo "$NAME."
6564 ;;
6665 stop)
6766 echo -n "Stopping $DESC: "
68 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
69 --exec $DAEMON
67 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
7068 echo "$NAME."
7169 ;;
7270 restart|force-reload)
7371 echo -n "Restarting $DESC: "
74 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
75 --exec $DAEMON
72 start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
7673 sleep 1
7774 start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
7875 --exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
79 ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
76 /bin/pidof $DAEMON > /var/run/$NAME.pid
8077 echo "$NAME."
8178 ;;
8279 *)
8380 N=/etc/init.d/$NAME
84 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
8581 echo "Usage: $N {start|stop|restart|force-reload}" >&2
8682 exit 1
8783 ;;
22
33 # generate correct pid file, for versions where was non or incorrect
44 if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.06-6"; then
5 ps aux | grep /usr/bin/ps-watcher | head -1 | awk '{ print $2 }' > /var/run/ps-watcher.pid
5 /bin/pidof ps-watcher > /var/run/ps-watcher.pid
66 fi
77 #DEBHELPER#