[asterisk-users] What is this?
bilal ghayyad
bilmar_gh at yahoo.com
Thu Aug 23 13:57:23 CDT 2007
Hi List;
I saw this is written in that link:
http://www.voip-info.org/wiki/view/Asterisk+options
And really I was not able to understand for what is
that and where I can learn about it and how to write
such thing? Can some one advise me?
!/bin/bash
asterisk Startup script for the asterisk PBX Server
chkconfig: - 87 15
description: Asterisk is a PBX server.
processname: asterisk
config: /etc/asterisk/
pidfile: /var/run/asterisk.pid
Source function library.
. /etc/rc.d/init.d/functions
asterisk=/usr/sbin/asterisk
prog=Asterisk
pidfile=/var/run/asterisk.pid
lockfile=/var/lock/subsys/asterisk
RETVAL=0
start() {
echo -n $"Starting $prog: "
daemon $asterisk $OPTIONS
RETVAL=$?
echo
$RETVAL = 0 && touch ${lockfile}
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $asterisk
RETVAL=$?
echo
$RETVAL = 0 && rm -f ${lockfile} ${pidfile}
}
reload() {
echo -n $"Reloading $prog config files "
$asterisk -rx reload
RETVAL=$?
echo
}
See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
reload
;;
*)
echo $"Usage: $prog
{start|stop|restart|reload}"
exit 1
esac
exit $RETVAL
Regards,
Bilal Ghayad
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
More information about the asterisk-users
mailing list