2
0

freeswitch-systemd.freeswitch.service 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ;;;;; Author: Travis Cross <tc@traviscross.com>
  2. [Unit]
  3. Description=freeswitch
  4. Wants=network-online.target
  5. Requires=network.target local-fs.target
  6. After=network.target network-online.target local-fs.target
  7. [Service]
  8. ; service
  9. Type=forking
  10. PIDFile=/run/freeswitch/freeswitch.pid
  11. Environment="DAEMON_OPTS=-nonat"
  12. Environment="USER=freeswitch"
  13. Environment="GROUP=freeswitch"
  14. EnvironmentFile=-/etc/default/freeswitch
  15. ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/lib/freeswitch /var/log/freeswitch /etc/freeswitch /usr/share/freeswitch /var/run/freeswitch
  16. ExecStart=/usr/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait ${DAEMON_OPTS}
  17. TimeoutSec=45s
  18. Restart=always
  19. ; exec
  20. ;User=${USER}
  21. ;Group=${GROUP}
  22. LimitCORE=infinity
  23. LimitNOFILE=100000
  24. LimitNPROC=60000
  25. LimitSTACK=250000
  26. LimitRTPRIO=infinity
  27. LimitRTTIME=infinity
  28. IOSchedulingClass=realtime
  29. IOSchedulingPriority=2
  30. CPUSchedulingPolicy=rr
  31. CPUSchedulingPriority=89
  32. UMask=0007
  33. NoNewPrivileges=false
  34. ; alternatives which you can enforce by placing a unit drop-in into
  35. ; /etc/systemd/system/freeswitch.service.d/*.conf:
  36. ;
  37. ; User=freeswitch
  38. ; Group=freeswitch
  39. ; ExecStart=
  40. ; ExecStart=/usr/bin/freeswitch -ncwait -nonat -rp
  41. ;
  42. ; empty ExecStart is required to flush the list.
  43. ;
  44. ; if your filesystem supports extended attributes, execute
  45. ; setcap 'cap_net_bind_service,cap_sys_nice=+ep' /usr/bin/freeswitch
  46. ; this will also allow socket binding on low ports
  47. ;
  48. ; otherwise, remove the -rp option from ExecStart and
  49. ; add these lines to give real-time priority to the process:
  50. ;
  51. ; PermissionsStartOnly=true
  52. ; ExecStartPost=/bin/chrt -f -p 1 $MAINPID
  53. ;
  54. ; execute "systemctl daemon-reload" after editing the unit files.
  55. [Install]
  56. WantedBy=multi-user.target