make use of pidof
This commit is contained in:
parent
d26a0d55a0
commit
fde3e09a70
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -3,6 +3,7 @@ dns-flood-detector (1.12-3) UNREALESED; urgency=low
|
||||||
* added Vcs- fields, moved Homepage into source header's field
|
* added Vcs- fields, moved Homepage into source header's field
|
||||||
* bump standards version to 3.7.3
|
* bump standards version to 3.7.3
|
||||||
* change copyright of packaging to 2008 in debian/copyright
|
* change copyright of packaging to 2008 in debian/copyright
|
||||||
|
* get rid of 'ps aux' in init script and preinst, using pidof instead
|
||||||
|
|
||||||
-- Jan Wagner <waja@cyconet.org> Sun, 09 Dec 2007 22:48:23 +0100
|
-- Jan Wagner <waja@cyconet.org> Sun, 09 Dec 2007 22:48:23 +0100
|
||||||
|
|
||||||
|
|
12
debian/init.d
vendored
12
debian/init.d
vendored
|
@ -35,7 +35,7 @@ case "$1" in
|
||||||
echo -n "Starting $DESC: "
|
echo -n "Starting $DESC: "
|
||||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||||
--exec $DAEMON -- $DAEMON_OPTS
|
--exec $DAEMON -- $DAEMON_OPTS
|
||||||
ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
|
/bin/pidof $DAEMON > /var/run/$NAME.pid
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
|
@ -46,11 +46,11 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
echo -n "Restarting $DESC: "
|
echo -n "Restarting $DESC: "
|
||||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
|
start-stop-daemon --stop --quiet --pidfile \
|
||||||
--exec $DAEMON
|
/var/run/$NAME.pid --exec $DAEMON
|
||||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
start-stop-daemon --start --quiet --pidfile \
|
||||||
--exec $DAEMON -- $DAEMON_OPTS
|
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
|
||||||
ps aux | grep $DAEMON | head -1 | awk '{ print $2 }' > /var/run/$NAME.pid
|
/bin/pidof $DAEMON > /var/run/$NAME.pid
|
||||||
echo "$NAME."
|
echo "$NAME."
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
2
debian/preinst
vendored
2
debian/preinst
vendored
|
@ -3,6 +3,6 @@ set -e
|
||||||
|
|
||||||
# generate correct pid file, for versions where was non or incorrect
|
# generate correct pid file, for versions where was non or incorrect
|
||||||
if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.12-1"; then
|
if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" <= "1.12-1"; then
|
||||||
ps aux | grep /usr/bin/dns-flood-detector | head -1 | awk '{ print $2 }' > /var/run/dns-flood-detector.pid
|
/bin/pidof dns-flood-detector > /var/run/dns-flood-detector.pid
|
||||||
fi
|
fi
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
Loading…
Reference in a new issue