3 # Start & stop the inadyn client
6 CONFIG
=/etc
/inadyn.conf
8 # check if CONFIG exists, print message & exit if it doesn't
9 [ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 )
11 # Allow a few customizations from a config file. Especially inadyn
12 # must be explicitly enabled by adding ENABLED="yes" in this file.
13 test -r /etc
/default
/inadyn
&& .
/etc
/default
/inadyn
17 printf "Starting inadyn: "
18 if test "${ENABLED}" != "yes" ; then
22 start-stop-daemon
-b -q -S -p /var
/run
/inadyn.pid
-x /usr
/sbin
/inadyn
23 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
26 printf "Stopping inadyn: "
27 if test "${ENABLED}" != "yes" ; then
31 start-stop-daemon
-q -K -p /var
/run
/inadyn.pid
-x /usr
/sbin
/inadyn
32 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
33 rm -f /var
/run
/inadyn.pid
40 echo "Usage: $0 {start|stop|restart}"