5
# Required-Start: $local_fs $remote_fs $network
6
# Required-Stop: $local_fs $remote_fs
7
# Default-Start: 2 3 4 5
9
# Short-Description: Start simple radio NTP reference clock daemon
10
# Description: Start simple radio NTP reference clock daemon
14
PATH=/sbin:/bin:/usr/sbin:/usr/bin
15
DAEMON=/usr/sbin/radioclkd
17
DESC="Radio Clock daemon"
18
DEFAULTS=/etc/default/radioclk
20
test -f $DAEMON || exit 0
24
if [ -e "$DEFAULTS" ] ; then
28
if [ "$PORT" = "" ] ; then
29
printf "You need to edit $DEFAULTS before using $NAME.\n"
35
echo -n "Starting $DESC: "
36
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
37
--exec $DAEMON -- $PORT
41
echo -n "Stopping $DESC: "
42
start-stop-daemon --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \
48
# If the daemon can reload its config files on the fly
49
# for example by sending it SIGHUP, do it here.
51
# If the daemon responds to changes in its config file
52
# directly anyway, make this a do-nothing entry.
54
# echo "Reloading $DESC configuration files."
55
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
56
# /var/run/$NAME.pid --exec $DAEMON
60
# If the "reload" option is implemented, move the "force-reload"
61
# option to the "reload" entry above. If not, "force-reload" is
62
# just the same as "restart".
64
echo -n "Restarting $DESC: "
65
start-stop-daemon --stop --quiet --pidfile \
66
/var/run/$NAME.pid --exec $DAEMON
68
start-stop-daemon --start --quiet --pidfile \
69
/var/run/$NAME.pid --exec $DAEMON -- $PORT
74
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
75
echo "Usage: $N {start|stop|restart|force-reload}" >&2