Files
asterisk/contrib/upstart/asterisk.upstart-0.3.9
Sean Bright 5a2ef47b2f Make sure that since we are passing -c to asterisk that we have a console.
Without this line, Asterisk will busy-loop trying to read and write to
/dev/null (woops... my bad).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-13 18:46:47 +00:00

38 lines
738 B
Groff

# asterisk
#
# Upstart control file for the Asterisk PBX
#
# To install, rename this file to 'asterisk' and copy it to /etc/event.d/
#
# To start asterisk manually:
# sudo start asterisk
#
# To stop asterisk manually:
# sudo stop asterisk
description "Asterisk PBX"
version "1.6.3"
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
pre-start script
# Since Ubuntu clears /var/run on reboot, create this before we try to start
mkdir -p /var/run/asterisk
end script
console output
respawn
exec /usr/sbin/asterisk -vvvvvvvg -cf
post-stop script
# Might as well clean up after ourselves, too.
rm -rf /var/run/asterisk
end script