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 \
42 if [ $RETVAL -eq 0 ]; then
43 touch /var/lock/subsys/eventum-irc
51 if [ ! -f /var/lock/subsys/eventum-irc ]; then
52 msg_not_running "Eventum IRC Bot"
56 msg_stopping "Eventum IRC Bot"
57 if start-stop-daemon --stop --oknodo --pidfile $PIDFILE; then
58 rm -f $PIDFILE /var/lock/subsys/eventum-irc >/dev/null 2>&1
66 if [ ! -f /var/lock/subsys/eventum-irc ]; then
67 msg_not_running "Eventum IRC Bot"
77 # See how we were called.
93 status --pidfile $PIDFILE eventum-irc
97 msg_usage "$0 {start|stop|restart|force-reload|status}"