@@ -3,6 +3,7 @@ DAEMON=/usr/sbin/crond
NAME=crond
DESC="Busybox Periodic Command Scheduler"
ARGS=""
+PIDFILE=/var/run/busybox-crond.pid
test -f $DAEMON || exit 0
@@ -12,12 +13,12 @@ case "$1" in
start)
splash_progress PLACEHOLDER
echo -n "starting $DESC: $NAME... "
- start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
+ start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS
echo "done."
;;
stop)
echo -n "stopping $DESC: $NAME... "
- start-stop-daemon -K -n $NAME
+ start-stop-daemon -K -p $PIDFILE
echo "done."
;;
restart)
@@ -4,6 +4,7 @@ NAME=httpd
DESC="Busybox HTTP Daemon"
HTTPROOT="/srv/www"
ARGS="-h $HTTPROOT"
+PIDFILE=/var/run/httpd.pid
test -f $DAEMON || exit 0
@@ -17,12 +18,12 @@ case "$1" in
exit 1
fi
splash_progress PLACEHOLDER
- start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
+ start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS
echo "done."
;;
stop)
echo -n "stopping $DESC: $NAME... "
- start-stop-daemon -K -n $NAME
+ start-stop-daemon -K -p $PIDFILE
echo "done."
;;
restart)
@@ -3,6 +3,7 @@ DAEMON=/usr/sbin/udhcpd
NAME=udhcpd
DESC="Busybox UDHCP Server"
ARGS="/etc/udhcpd.conf"
+PIDFILE=/var/run/udhcpd.pid
test -f $DAEMON || exit 1
@@ -15,12 +16,12 @@ case "$1" in
echo "error: /etc/udhcpd.conf is missing."
exit 1
fi
- /sbin/start-stop-daemon -S -b -n $NAME -a $DAEMON -- $ARGS
+ /sbin/start-stop-daemon -S -b -m -p $PIDFILE -a $DAEMON -- $ARGS
echo "done."
;;
stop)
echo -n "stopping $DESC: $NAME... "
- /sbin/start-stop-daemon -K -n $NAME
+ /sbin/start-stop-daemon -K -p $PIDFILE
echo "done."
;;
restart)
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk> --- recipes/busybox/files/busybox-crond | 5 +++-- recipes/busybox/files/busybox-httpd | 5 +++-- recipes/busybox/files/busybox-udhcpd | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-)