summaryrefslogtreecommitdiff
path: root/packages/mystun-server/files/init
blob: c9927462607f6bd089cce260d036e385e03d5f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin

case "$1" in
	start)
		echo -n "Starting mystun server"
		test -d /var/run || mkdir -p /var/run
		mystun-server -D -P /var/run/mystun-server.pid
		echo "."
	;;
	stop)
		echo -n "Stopping mystun server"
		kill $(cat /var/run/mystun-server.pid)
		echo "."
	;;
	restart)
		$0 stop
		$0 start
	;;
	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
	;;
esac

exit 0