aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/upstart
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 19:42:26 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-12 19:42:26 +0000
commit4c17360cd730ace2b3a120ecdc1e47de45147205 (patch)
tree63b08e0278a61f38712b741e4dbaf3155b2db869 /contrib/upstart
parent245b0fb2ab122f2833f0c0cc21e839f17a405516 (diff)
First shot at an upstart script for asterisk on Ubuntu.
This works relatively well (assuming you are using /var/run/asterisk) as your run directory and upstart 0.3.9. Needs to be generalized and eventually added to the 'make install' target for Ubuntu. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200428 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/upstart')
-rw-r--r--contrib/upstart/asterisk.upstart-0.3.928
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/upstart/asterisk.upstart-0.3.9 b/contrib/upstart/asterisk.upstart-0.3.9
new file mode 100644
index 000000000..4f75b3134
--- /dev/null
+++ b/contrib/upstart/asterisk.upstart-0.3.9
@@ -0,0 +1,28 @@
+# asterisk
+#
+# Upstart control file for the Asterisk PBX
+
+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
+
+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