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 if [ -f /var/lock/subsys/eventum-irc ]; then
29 msg_already_running "Eventum IRC Bot"
33 msg_starting "Eventum IRC Bot"
34 start-stop-daemon --start \
35 --exec /usr/share/eventum/bin/irc-bot.php \
41 if [ $RETVAL -eq 0 ]; then
42 touch /var/lock/subsys/eventum-irc
50 if [ ! -f /var/lock/subsys/eventum-irc ]; then
51 msg_not_running "Eventum IRC Bot"
55 msg_stopping "Eventum IRC Bot"
56 if start-stop-daemon --stop --oknodo --pidfile $PIDFILE; then
57 rm -f $PIDFILE /var/lock/subsys/eventum-irc >/dev/null 2>&1
65 if [ ! -f /var/lock/subsys/eventum-irc ]; then
66 msg_not_running "Eventum IRC Bot"
76 # See how we were called.
92 status eventum-irc-bot php
96 msg_usage "$0 {start|stop|restart|force-reload|status}"