# HG changeset patch # User heiko # Date 1133334955 0 # Node ID 2a605c25d2c5f51dcf23d813828acea5413fe0eb # Parent d1dd256c037abb765de8cf39aa8e4b1ceaaf4c28 Anhalten ging noch nicht zuverlaessig. diff -r d1dd256c037a -r 2a605c25d2c5 dns-autoslave --- a/dns-autoslave Wed Nov 30 06:55:20 2005 +0000 +++ b/dns-autoslave Wed Nov 30 07:15:55 2005 +0000 @@ -79,7 +79,7 @@ exit 0; } - $SIG{TERM} = sub { warn "Exit.\n"; exit 0; }; + $SIG{TERM} = sub { warn "Exit.\n"; unlink $Cf->pid; exit 0; }; close(STDIN); close(STDOUT); close(STDERR); close(PID); $0 = ME." [capturing]"; Net::Pcap::loop($pcap, -1, \&process, undef); diff -r d1dd256c037a -r 2a605c25d2c5 rc.dns-autoslave --- a/rc.dns-autoslave Wed Nov 30 06:55:20 2005 +0000 +++ b/rc.dns-autoslave Wed Nov 30 07:15:55 2005 +0000 @@ -1,20 +1,18 @@ -#! /bin/sh +#! /bin/sh # $Id$ # $URL$ DAEMON=/usr/local/sbin/dns-autoslave -NAME=`basename $DAEMON` - -test -x $MASTER_WATCHER || exit 0 +PIDFILE=/var/run/`basename $DAEMON`.pid case $1 in start) - start-stop-daemon -v --start --name $NAME --startas $DAEMON + start-stop-daemon -v --start --pidfile $PIDFILE --startas $DAEMON ;; stop) - start-stop-daemon -v --stop --retry 30 --name $NAME + start-stop-daemon -v --stop --retry 30 --pidfile $PIDFILE ;; restart) echo "Restarting $NAME..."