summaryrefslogtreecommitdiffstats
path: root/testing/kamailio/kamailio.initd
blob: afe9cb0824e9e5f227a2c3c525fba0a510e872f9 (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
#!/sbin/runscript

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

depend() {
	need net
}

start() {
	ebegin "Starting Kamailio"
	start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
		-- \
		-u ${KAMAILIO_USER:-kamailio} \
		-g ${KAMAILIO_GROUP:-kamailio} \
		-P $pidfile  
	eend $?
}

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