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_starting "Eventum IRC Bot"
30 start-stop-daemon --start \
31 --exec /usr/sbin/eventum-irc-bot \
37 if [ $RETVAL -eq 0 ]; then
38 touch /var/lock/subsys/eventum-irc
44 msg_already_running "Eventum IRC Bot"
49 if [ -f /var/lock/subsys/eventum-irc ]; then
50 msg_stopping "Eventum IRC Bot"
51 if start-stop-daemon --stop --oknodo --pidfile $PIDFILE; then
52 rm -f $PIDFILE /var/lock/subsys/eventum-irc >/dev/null 2>&1
58 msg_not_running "Eventum IRC Bot"
63 # See how we were called.
76 status eventum-irc-bot php
80 msg_usage "$0 {start|stop|restart|status}"