summaryrefslogtreecommitdiff
blob: 676fe1037ad4782a22ba6f0164f3f277af6d926b (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
#!/sbin/openrc-run
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2


depend() {
	need net
	use dns
	after sshd
}


start() {
	ebegin "Starting turnserver"
	checkpath -q -d -m 0755 -o turnserver:turnserver /var/run/turnserver
	checkpath -q -f -m 0660 -o turnserver:turnserver /var/log/turnserver.log
	start-stop-daemon --start --user turnserver --exec /usr/bin/turnserver -- -o \
	--pidfile /var/run/turnserver/turnserver.pid >/dev/null
	eend $?
}

stop() {
	ebegin "Stopping turnserver"
	start-stop-daemon --stop --quiet --pidfile /var/run/turnserver/turnserver.pid
	eend $?
}