blob: 006a704dadfe7b68d6eb20f5c0a00764033e1681 [file] [log] [blame]
#!/bin/sh
#
# Run the daemon
#
DAEMON="sntp"
PIDFILE="/var/run/$DAEMON.pid"
EXEC="/usr/bin/sntp"
EXEC_ARGS=""
start() {
echo -n "Starting $DAEMON... "
start-stop-daemon -S -b -m -p $PIDFILE -x $EXEC -- $EXEC_ARGS
[ $? -eq 0 ] && echo "OK" || echo "ERROR"
}
stop() {
echo -n "Stopping $DAEMON... "
start-stop-daemon -K -p $PIDFILE
[ $? -eq 0 ] && echo "OK" || echo "ERROR"
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
"$1"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?