aboutsummaryrefslogtreecommitdiffstats
path: root/main/kamailio/kamailio.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-30 06:11:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-30 06:11:36 +0000
commit6ca9d7f656434f67c7409e408c980f824db897af (patch)
tree72edb8cc4390cf2e08548dd03ff7ff0294d68d49 /main/kamailio/kamailio.initd
parente92cddc8802b50ba8d81819040bbc20b78a51715 (diff)
downloadaports-6ca9d7f656434f67c7409e408c980f824db897af.tar.bz2
aports-6ca9d7f656434f67c7409e408c980f824db897af.tar.xz
main/kamailio: moved from testing
Diffstat (limited to 'main/kamailio/kamailio.initd')
-rw-r--r--main/kamailio/kamailio.initd26
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 $?
+}