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