3 # anope anope IRC Services
6 # description: anope is an IRC services daemon.
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
16 [ -f /etc/sysconfig/anope ] && . /etc/sysconfig/anope
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 msg_network_down anope
29 daemon --user anope anope
31 if [ $RETVAL -eq 0 ]; then
32 touch /var/lock/subsys/anope
38 killproc --pidfile /var/run/anope.pid anope
39 rm -f /var/lock/subsys/anope >/dev/null 2>&1
43 # sending INT signal will make anope close all listening sockets and
44 # wait for client connections to terminate.
45 killproc --pidfile /var/run/anope.pid anope -HUP
49 # See how we were called.
52 # Check if the service is already running?
53 if [ ! -f /var/lock/subsys/anope ]; then
57 msg_already_running anope
62 if [ -f /var/lock/subsys/anope ]; then
74 if [ -f /var/lock/subsys/anope ]; then
86 reload|graceful|force-reload)
87 if [ -f /var/lock/subsys/anope ]; then
97 if [ -f /var/lock/subsys/anope ]; then
98 nls "Rotating %s logs" anope
99 killproc --pidfile /var/run/anope.pid anope -HUP
102 msg_not_running anope
107 msg_usage "$0 {start|stop|restart|reload|force-reload|graceful|flush-logs|status}"