asterisk.user.conf 994 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # asterisk
  2. #
  3. # Upstart control file for the Asterisk PBX
  4. #
  5. # To install, rename this file to 'asterisk' and copy it to /etc/event.d/
  6. # On Debian: copy to /etc/init/
  7. #
  8. # To start asterisk manually:
  9. # sudo start asterisk
  10. #
  11. # To stop asterisk manually:
  12. # sudo stop asterisk
  13. #
  14. # Asterisk is started with an "interactive console", though redirected
  15. # to/from /dev/null . The concept of a main console is bad. OTOH, the main
  16. # process should not detach from the console if we work with upstart and
  17. # alike.
  18. #
  19. # The username 'asterisk' is currently hardwired here, and likewise the
  20. # varrundir.
  21. #
  22. description "Asterisk PBX"
  23. #version "1.8"
  24. start on runlevel [2345]
  25. stop on runlevel [!2345]
  26. pre-start script
  27. # Since Ubuntu clears /var/run on reboot, create this before we try to start
  28. if [ ! -d /var/run/asterisk ]; then
  29. mkdir -p asterisk /var/run/asterisk
  30. chown asterisk: /var/run/asterisk
  31. fi
  32. end script
  33. #console output
  34. respawn
  35. exec /usr/sbin/asterisk -U asterisk -g -f