logrotate: enable selinux support
[buildroot-gz.git] / package / inadyn / S70inadyn
blobca7b4146781794f1e1be1e68b5abb68097923597
1 #!/bin/sh
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
15 case "$1" in
16 start)
17 printf "Starting inadyn: "
18 if test "${ENABLED}" != "yes" ; then
19 echo "SKIPPED"
20 exit 0
22 start-stop-daemon -b -q -S -p /var/run/inadyn.pid -x /usr/sbin/inadyn
23 [ $? = 0 ] && echo "OK" || echo "FAIL"
25 stop)
26 printf "Stopping inadyn: "
27 if test "${ENABLED}" != "yes" ; then
28 echo "SKIPPED"
29 exit 0
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
35 restart)
36 "$0" stop
37 "$0" start
40 echo "Usage: $0 {start|stop|restart}"
41 exit 1
42 esac
44 exit $?