4 # description: Eventum IRC Notification Bot
6 # Source function library
7 . /etc/rc.d/init.d/functions
10 . /etc/sysconfig/network
12 PIDFILE=/var/run/eventum/irc_bot.pid
15 [ -f /etc/sysconfig/eventum-irc ] && . /etc/sysconfig/eventum-irc
17 # Check that networking is up.
18 if is_yes "${NETWORKING}"; then
19 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status -a "$1" != init ]; then
20 msg_network_down "Eventum IRC Bot"
28 # See how we were called.
31 if [ ! -f /var/lock/subsys/eventum-irc ]; then
32 msg_starting "Eventum IRC Bot"
33 start-stop-daemon --start \
34 --exec /usr/sbin/eventum-bot \
40 if [ $RETVAL -eq 0 ]; then
41 touch /var/lock/subsys/eventum-irc
47 msg_already_running "Eventum IRC Bot"
51 if [ -f /var/lock/subsys/eventum-irc ]; then
52 msg_stopping "Eventum IRC Bot"
53 if start-stop-daemon --stop --oknodo --pidfile $PIDFILE; then
54 rm -f $PIDFILE /var/lock/subsys/eventum-irc >/dev/null 2>&1
60 msg_not_running "Eventum IRC Bot"
69 status "Eventum IRC Bot" php
73 msg_usage "$0 {start|stop|restart|status}"