[SR-Users] Kamailio 4.3 and Debian 8.2 systemctl
adnan.mahmud
km.adnan at gmail.com
Sat Nov 14 21:38:41 CET 2015
Hi,
Could you solve this? I had the same problem on Ubuntu 15 and I solved as
follows:
a separate directory /var/run/kamailio for pid does not work. Because after
reboot the directory is gone.
One thought was to create the directory and give the necessary permission
before starting the service with "ExecStart". But unfortunately systemd
fails and cannot run "/bin/mkdir" to create the directory. So I come up with
the following setup that works fine:
/etc/systemd/system/kamailio.service:
[Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server
After=syslog.target network.target
[Service]
Type=forking
EnvironmentFile=/etc/kamailio/kamailio.sysconfig
PermissionsStartOnly=true
ExecStart=/usr/local/sbin/kamailio -P /var/run/kamailio.pid $OPTIONS
ExecStopPost=/bin/rm -f /var/run/kamailio.pid
Restart=on-abort
; exec
WorkingDirectory=/var/log/kamailio
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitRTPRIO=infinity
LimitRTTIME=7000000
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
[Install]
WantedBy=multi-user.target
/etc/kamailio/kamailio.sysconfig:
OPTIONS="-m 32 -M 4 -u kamailio -g kamailio -f /etc/kamailio/kamailio.cfg"
Make sure to create /var/log/kamailio and give the user "kamailio" proper
permission on this directory. If you want to use some other working
directory for kamailio, do the same on that directory.
Cheers,
Adnan
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Kamailio-4-3-and-Debian-8-2-systemctl-tp142495p143070.html
Sent from the Users mailing list archive at Nabble.com.
More information about the sr-users
mailing list