[asterisk-commits] tzafrir: trunk r226227 - /trunk/contrib/upstart/asterisk.user.conf

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 27 17:10:42 CDT 2009


Author: tzafrir
Date: Tue Oct 27 17:10:38 2009
New Revision: 226227

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=226227
Log:
another variation of the upstart script

Added:
    trunk/contrib/upstart/asterisk.user.conf   (with props)

Added: trunk/contrib/upstart/asterisk.user.conf
URL: http://svnview.digium.com/svn/asterisk/trunk/contrib/upstart/asterisk.user.conf?view=auto&rev=226227
==============================================================================
--- trunk/contrib/upstart/asterisk.user.conf (added)
+++ trunk/contrib/upstart/asterisk.user.conf Tue Oct 27 17:10:38 2009
@@ -1,0 +1,44 @@
+# asterisk
+#
+# Upstart control file for the Asterisk PBX
+#
+# To install, rename this file to 'asterisk' and copy it to /etc/event.d/
+# On Debian: copy to /etc/init/
+#
+# To start asterisk manually:
+#     sudo start asterisk
+#
+# To stop asterisk manually:
+#     sudo stop asterisk
+#
+# Asterisk is started with an "interactive console", though redirected
+# to/from /dev/null . The concept of a main console is bad. OTOH, the main
+# process should not detach from the console if we work with upstart and
+# alike.
+#
+# The username 'asterisk' is currently hardwired here, and likewise the
+# varrundir.
+#
+
+description "Asterisk PBX"
+#version     "1.6.3"
+
+start on runlevel [2345]
+stop  on runlevel [!2345]
+
+pre-start script
+  # Since Ubuntu clears /var/run on reboot, create this before we try to start
+  if [ ! -d /var/run/asterisk ]; then
+    mkdir -p asterisk /var/run/asterisk
+    chown asterisk: /var/run/asterisk
+  fi
+end script
+
+#console output
+respawn
+exec /usr/sbin/asterisk -U asterisk -g -f
+
+post-stop script
+  # Might as well clean up after ourselves, too.
+  rm -rf /var/run/asterisk
+end script

Propchange: trunk/contrib/upstart/asterisk.user.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: trunk/contrib/upstart/asterisk.user.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: trunk/contrib/upstart/asterisk.user.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list