micropython: Set MICROPY_GCREGS_SETJMP=1 for xtensa and sh
[buildroot-gz.git] / package / inadyn / S70inadyn
blobb20048ce8c0d949255c07a007649c5e4c97ac5f9
1 #!/bin/sh
3 # Start & stop the inadyn client
6 CONFIG=/etc/inadyn.conf
7 VR_INADYN=/var/run/inadyn
9 # check if CONFIG exists, print message & exit if it doesn't
10 [ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 )
12 # check if VR_INADYN exists, create it if not
13 [ ! -d $VR_INADYN ] && mkdir -p $VR_INADYN
15 case "$1" in
16 start)
17 echo "Starting inadyn: "
18 start-stop-daemon -S -x /usr/bin/inadyn
19 [ $? = 0 ] && echo "OK" || echo "FAIL"
21 stop)
22 echo "Stopping inadyn: "
23 start-stop-daemon -q -K -x /usr/bin/inadyn
24 [ $? = 0 ] && echo "OK" || echo "FAIL"
25 rm -f /var/run/inadyn/inadyn.pid
27 restart)
28 "$0" stop
29 "$0" start
32 echo "Usage: $0 {start|stop|restart}"
33 exit 1
34 esac
36 exit $?