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