pkg/kamailio: Added systemd unit relanch after non null exit code. Fix of ticket...
[sip-router] / pkg / kamailio / centos / 7 / kamailio.service
1 [Unit]
2 Description=Kamailio (OpenSER) - the Open Source SIP Server
3 Documentation=man:kamailio(8) https://www.kamailio.org/
4 Wants=network-online.target
5 After=network-online.target
6
7 [Service]
8 Type=forking
9 WorkingDirectory=/run/kamailio
10 Environment='CFGFILE=/etc/kamailio/kamailio.cfg'
11 Environment='SHM_MEMORY=64'
12 Environment='PKG_MEMORY=8'
13 EnvironmentFile=/etc/sysconfig/kamailio
14 # PIDFile requires a full absolute path
15 PIDFile=/run/kamailio/kamailio.pid
16 # ExecStart requires a full absolute path
17 ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
18 ExecStopPost=/usr/bin/rm -f /run/kamailio/kamailio.pid
19 Restart=on-failure
20 User=kamailio
21 Group=daemon
22 ; For each TCP or TLS endpoint connection is requred file descriptor
23 LimitNOFILE=99999
24
25
26 [Install]
27 WantedBy=multi-user.target