[Asterisk-Users] Asterisk on Fedora Core 2 startup script

Ezio Vernacotola ezio at uptime.it
Sun May 29 01:59:18 MST 2005


Greg,
I was never able to automatically restart asterisk in fedora core 2 
using asterisk/contrib/init.d/rc.redhat.asterisk.
I don't know if this happens only to me.

# make config
# /etc/rc.d/init.d/asterisk start
# kill -11 `cat /var/run/asterisk.pid`

asterisk doesn't restart.

I have to take off "daemon" from cmd line to make it work

--- /etc/rc.d/init.d/asterisk   2005-05-29 10:48:02.298929139 +0200
+++ /etc/rc.d/init.d/asterisk.new      2005-05-26 23:07:36.000000000 +0200
@@ -52,7 +52,11 @@
        if [ $AST_GROUP ] ; then
                ASTARGS="`echo $ASTARGS` -G $AST_GROUP"
        fi
-       daemon $DAEMON $ASTARGS
+       #daemon $DAEMON $ASTARGS
+       base=asterisk
+        echo -n " $base"
+       $DAEMON $ASTARGS
+       [ "$?" -eq 0 ] && success $"$base startup" || failure $"$base 
startup"
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/asterisk
        echo


Ezio Vernacotola




More information about the asterisk-users mailing list