diff options
Diffstat (limited to 'main/kamailio/kamailio.initd')
-rw-r--r-- | main/kamailio/kamailio.initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/main/kamailio/kamailio.initd b/main/kamailio/kamailio.initd new file mode 100644 index 0000000000..ee4e2ecef1 --- /dev/null +++ b/main/kamailio/kamailio.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript + +daemon=/usr/sbin/kamailio +pidfile=/var/run/kamailio/kamailio.pid + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting Kamailio" + start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ + -- \ + -u ${KAMAILIO_USER:-kamailio} \ + -g ${KAMAILIO_GROUP:-kamailio} \ + -P $pidfile \ + ${KAMAILIO_OPTS:-} + eend $? +} + +stop() { + ebegin "Stopping Kamailio" + start-stop-daemon --stop --quiet --pidfile $pidfile + eend $? +} |