[Pkg-voip-commits] [kamailio] 02/04: add systemd .service file and dh-systemd commands

Victor Seva Lopez maniac-guest at moszumanska.debian.org
Tue Nov 10 13:52:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

maniac-guest pushed a commit to branch master
in repository kamailio.

commit 592ea26017c05b51d93c76c074ae59e627037f11
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Date:   Mon Nov 9 11:01:25 2015 +0100

    add systemd .service file and dh-systemd commands
---
 debian/control          |  1 +
 debian/kamailio.service | 21 +++++++++++++++++++++
 debian/rules            |  2 ++
 3 files changed, 24 insertions(+)

diff --git a/debian/control b/debian/control
index a9c8501..d5e0f03 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Victor Seva <linuxmaniac at torreviejawireless.org>,
            Tzafrir Cohen <tzafrir at debian.org>
 Build-Depends: bison,
                debhelper (>= 9),
+               dh-systemd (>= 1.5),
                docbook-xml,
                dpkg-dev (>= 1.16.1.1),
                erlang-dev,
diff --git a/debian/kamailio.service b/debian/kamailio.service
new file mode 100644
index 0000000..06c3334
--- /dev/null
+++ b/debian/kamailio.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Kamailio (OpenSER) - the Open Source SIP Server
+After=network.target
+
+[Service]
+Type=forking
+Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
+Environment='SHM_MEMORY=64'
+Environment='PKG_MEMORY=8'
+Environment='USER=kamailio'
+Environment='GROUP=kamailio'
+EnvironmentFile=-/etc/default/kamailio
+EnvironmentFile=-/etc/default/kamailio.d/*
+# PIDFile requires a full absolute path
+PIDFile=/var/run/kamailio/kamailio.pid
+# ExecStart requires a full absolute path
+ExecStart=/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/rules b/debian/rules
index f3c9b8b..637f577 100755
--- a/debian/rules
+++ b/debian/rules
@@ -201,7 +201,9 @@ binary-common:
 	dh_installdocs
 	dh_installexamples -Xobsoleted -Xsr
 	dh_installmenu
+	dh_systemd_enable -pkamailio
 	dh_installinit -pkamailio -- defaults 23
+	dh_systemd_start -pkamailio
 	dh_installcron
 	dh_installman
 	dh_installinfo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/kamailio.git



More information about the Pkg-voip-commits mailing list