qemu-or1k: sync needed kernel symbols from or1k-sim
[openadk.git] / package / mosquitto / files / mosquitto.init
blob05e61731f2a04de5541c2f44d7f8d902cc54530f
1 #!/bin/sh
2 #PKG mosquitto
3 #INIT 60
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${mosquitto:-NO}" = x"NO" && exit 0
10 test x"$mosquitto" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 [ -d /var/lib/mosquitto ] || mkdir -p /var/lib/mosquitto
15 /usr/sbin/mosquitto -d $mosquitto_flags
17 stop)
18 kill $(pgrep -f /usr/sbin/mosquitto)
20 restart)
21 sh $0 stop
22 sh $0 start
25 echo "Usage: $0 {start | stop | restart}"
26 exit 1
28 esac
29 exit $?