res_pjsip_log_forwarder.c: Add CLI "pjsip show buildopts".
[asterisk/asterisk.git] / contrib / init.d / rc.mandriva.asterisk
index 48cd4c5..e095ccf 100755 (executable)
 # processname: asterisk
 # 
 
+### BEGIN INIT INFO
+# Provides:            asterisk
+# Required-Start:    $network $syslog $named $local_fs $remote_fs
+# Required-Stop:     $network $syslog $named $local_fs $remote_fs
+# Should-Start:      dahdi misdn lcr wanrouter mysql postgresql
+# Should-Stop:       dahdi misdn lcr wanrouter mysql postgresql
+# Default-Start:       2 3 4 5
+# Default-Stop:                0 1 6
+# Short-Description:   Asterisk PBX
+# Description:         the Asterisk Open Source PBX
+### END INIT INFO
+
 # $Id$
 
 TTY=9                  # TTY (if you want one) for Asterisk to run on
@@ -123,7 +135,7 @@ case "$1" in
        start)
                # Check if Asterisk is already running.  If it is, then bug out, because
                # starting Asterisk when Asterisk is already running is very bad.
-               VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
+               VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version' 2>/dev/null`
                if [ "`echo $VERSION | cut -c 1-8`" = "Asterisk" ]; then
                        echo "Asterisk is already running.  $0 will exit now."
                        exit 1