aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/opensips/opensips.initd
blob: 09c03fd5d1b228a2092683ddf1a6d25f6df22f77 (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/runscript

daemon=/usr/sbin/opensips
pidfile=/var/run/opensips/opensips.pid

depend() {
	need net
	after firewall
}

start() {
	ebegin "Starting OpenSIPS"
	start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
		-- \
		-u ${OPENSIPS_USER:-opensips} \
		-g ${OPENSIPS_GROUP:-opensips} \
		-P $pidfile  
	eend $?
}

stop() {
	ebegin "Stopping OpenSIPS"
	start-stop-daemon --stop --quiet --pidfile $pidfile
	eend $?
}