asterisk.upstart-0.3.9 736 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #
  7. # To start asterisk manually:
  8. # sudo start asterisk
  9. #
  10. # To stop asterisk manually:
  11. # sudo stop asterisk
  12. description "Asterisk PBX"
  13. version "1.8"
  14. start on runlevel 2
  15. start on runlevel 3
  16. start on runlevel 4
  17. start on runlevel 5
  18. stop on runlevel 0
  19. stop on runlevel 1
  20. stop on runlevel 6
  21. pre-start script
  22. # Since Ubuntu clears /var/run on reboot, create this before we try to start
  23. mkdir -p /var/run/asterisk
  24. end script
  25. console output
  26. respawn
  27. exec /usr/sbin/asterisk -vvvvvvvg -cf
  28. post-stop script
  29. # Might as well clean up after ourselves, too.
  30. rm -rf /var/run/asterisk
  31. end script