freeswitch.init.archlinux 635 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. #
  3. # freeswitch.sh - startup script for freeswitch
  4. . /etc/rc.conf
  5. . /etc/rc.d/functions
  6. case "$1" in
  7. start)
  8. if [ -x /var/freeswitch/bin/freeswitch ] ; then
  9. stat_busy "freeswitch starting..."
  10. /var/freeswitch/bin/freeswitch -nc &
  11. add_daemon freeswitch
  12. stat_done
  13. fi
  14. ;;
  15. stop)
  16. if [ -x /var/freeswitch/bin/freeswitch ] ; then
  17. stat_busy "freeswitch stopping..."
  18. /var/freeswitch/bin/freeswitch -stop &
  19. rm_daemon freeswitch
  20. stat_done
  21. fi
  22. ;;
  23. *)
  24. echo "usage: $0 { start | stop }" >&2
  25. exit 1
  26. ;;
  27. esac