generic-poky/meta/recipes-extended/at/files/S99at
Jackie Huang 6d15552f8c at: add init.d/atd status command for LSB compliance
(From OE-Core rev: 9c19592afac6b38df7038da02bcda26dc28b4e4c)

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 11:47:17 +01:00

46 lines
578 B
Bash

#!/bin/sh
#
# Starts at daemon
#
umask 077
# Source function library.
. /etc/init.d/functions
start() {
echo -n "Starting atd: "
start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
echo "OK"
}
stop() {
echo -n "Stopping atd: "
start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
status)
status /usr/sbin/atd
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
exit $?