xref: /OK3568_Linux_fs/buildroot/package/dante/S50dante (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2#
3# Starts dante
4#
5
6# Allow a few customizations from a config file
7test -r /etc/default/dante && . /etc/default/dante
8
9start() {
10	printf "Starting dante: "
11	start-stop-daemon -S -q -p /var/run/dante.pid \
12		--exec /usr/sbin/sockd -- $DAEMON_ARGS
13	[ $? = 0 ] && echo "OK" || echo "FAIL"
14}
15stop() {
16	printf "Stopping dante: "
17	start-stop-daemon -K -q -p /var/run/dante.pid
18	[ $? = 0 ] && echo "OK" || echo "FAIL"
19}
20restart() {
21	stop
22	start
23}
24
25case "$1" in
26  start)
27	start
28	;;
29  stop)
30	stop
31	;;
32  restart|reload)
33	restart
34	;;
35  *)
36	echo "Usage: $0 {start|stop|restart}"
37	exit 1
38esac
39
40exit $?
41