puppet/modules/rhizo_base/files/freeswitch.service
Keith Whyte 29832190cf Refactor how we restart FS when neccesary
Sometimes RCCN updates require FS to restart, we don't do this because
we don't want to drop calls, instead we were waiting till the nighttime
when it's likely there are no calls, (we still didn't drop them)

Let's issue a shutdown elegant right away, so FS will restart as soon as 'possible'
2023-01-23 23:07:01 +01:00

29 lines
683 B
Desktop File

[Unit]
Description=freeswitch
After=syslog.target network.target local-fs.target
[Service]
Type=forking
PIDFile=/run/freeswitch/freeswitch.pid
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStart=/usr/bin/freeswitch -u root -g freeswitch -ncwait $DAEMON_OPTS
ExecStopPost=/bin/sh -c "if [ -f /tmp/FS-dirty ]; then rm /tmp/FS-dirty; fi"
TimeoutSec=45s
Restart=always
User=root
Group=daemon
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=250000
LimitRTPRIO=infinity
LimitRTTIME=infinity
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
[Install]
WantedBy=multi-user.target