-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfreeswitch.service
66 lines (62 loc) · 1.74 KB
/
freeswitch.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;;;;; Author: Travis Cross <[email protected]>
[Unit]
Description=freeswitch
After=syslog.target network.target local-fs.target
[Service]
; service
Type=forking
PermissionsStartOnly=true
ExecStartPre=-/bin/rm -r /run/freeswitch
ExecStartPre=-/bin/mkdir /run/freeswitch
ExecStartPre=/bin/chown -R freeswitch:freeswitch /run/freeswitch/
PIDFile=/run/freeswitch/freeswitch.pid
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
;ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
ExecStart=/usr/bin/freeswitch -u freeswitch -rp -ncwait $DAEMON_OPTS
TimeoutSec=45s
Restart=always
; exec
User=root
Group=daemon
LimitCORE=infinity
LimitDATA=infinity
LimitFSIZE=infinity
LimitSIGPENDING=infinity
LimitNOFILE=999999
LimitMSGQUEUE=infinity
LimitNPROC=infinity
LimitAS=infinity
LimitLOCKS=infinity
LimitSTACK=250000
LimitMEMLOCK=infinity
LimitRTPRIO=infinity
LimitRTTIME=infinity
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
; alternatives which you can enforce by placing a unit drop-in into
; /etc/systemd/system/freeswitch.service.d/*.conf:
;
; User=freeswitch
; Group=freeswitch
; ExecStart=
; ExecStart=/usr/bin/freeswitch -ncwait -nonat -rp
;
; empty ExecStart is required to flush the list.
;
; if your filesystem supports extended attributes, execute
; setcap 'cap_net_bind_service,cap_sys_nice=+ep' /usr/bin/freeswitch
; this will also allow socket binding on low ports
;
; otherwise, remove the -rp option from ExecStart and
; add these lines to give real-time priority to the process:
;
; PermissionsStartOnly=true
; ExecStartPost=/bin/chrt -f -p 1 $MAINPID
;
; execute "systemctl daemon-reload" after editing the unit files.
[Install]
WantedBy=multi-user.target