Module: kamailio
Branch: master
Commit: 43a924bc8776ac8fa58a4c3bf3f8ed9c5486ab05
URL:
https://github.com/kamailio/kamailio/commit/43a924bc8776ac8fa58a4c3bf3f8ed9…
Author: Sergey Safarov <s.safarov(a)gmail.com>
Committer: Sergey Safarov <s.safarov(a)gmail.com>
Date: 2017-02-13T09:32:00-05:00
pkg/kamailio/centos: Fixed requirements of root permission to start daemon
---
Modified: pkg/kamailio/centos/7/kamailio.service
---
Diff:
https://github.com/kamailio/kamailio/commit/43a924bc8776ac8fa58a4c3bf3f8ed9…
Patch:
https://github.com/kamailio/kamailio/commit/43a924bc8776ac8fa58a4c3bf3f8ed9…
---
diff --git a/pkg/kamailio/centos/7/kamailio.service
b/pkg/kamailio/centos/7/kamailio.service
index 66945f4..40b4b99 100644
--- a/pkg/kamailio/centos/7/kamailio.service
+++ b/pkg/kamailio/centos/7/kamailio.service
@@ -4,14 +4,22 @@ After=network.target
[Service]
Type=forking
+WorkingDirectory=/run/kamailio
Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
+Environment='SHM_MEMORY=64'
+Environment='PKG_MEMORY=8'
EnvironmentFile=/etc/sysconfig/kamailio
# PIDFile requires a full absolute path
-PIDFile=/var/run/kamailio.pid
+PIDFile=/run/kamailio/kamailio.pid
# ExecStart requires a full absolute path
-ExecStart=/usr/sbin/kamailio -P /var/run/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M
$PKG_MEMORY -u $USER -g $GROUP
-ExecStopPost=/usr/bin/rm -f /var/run/kamailio.pid
+ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M
$PKG_MEMORY
+ExecStopPost=/usr/bin/rm -f /run/kamailio/kamailio.pid
Restart=on-abort
+User=kamailio
+Group=daemon
+; For each TCP or TLS endpoint connection is requred file descriptor
+LimitNOFILE=99999
+
[Install]
WantedBy=multi-user.target