3 # innd InterNet News System
6 # description: inn is the most popular server for Usenet news. It allows \
7 # you to setup local news servers. It can be difficult to \
8 # set up properly though, so be sure to read /usr/doc/inn* \
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration.
15 . /etc/sysconfig/network
18 . /usr/share/news/innshellvars
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network ]; then
23 msg_network_down "INN"
31 # See how we were called.
34 if [ ! -f /var/lock/subsys/inn ]; then
36 daemon su news -c inndstart
37 if is_yes "$DOINNWATCH" ; then
38 msg_starting "INN Watch"
41 /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
44 ps -C innwatch >/dev/null 2>&1 || usleep 500000
45 if [ $RETVAL -eq 0 ] && ps -C innwatch >/dev/null 2>&1; then
47 touch /var/lock/subsys/inn
53 touch /var/lock/subsys/inn
56 msg_already_running "INN"
60 if [ -f /var/lock/subsys/inn ]; then
63 if ctlinnd shutdown "Stopping INN service"; then
69 if [ -f /var/run/news/innwatch.pid ]; then
70 msg_stopping "INN Watch"
72 if killall -9 innwatch; then
77 rm -f /var/run/news/innwatch.pid \
78 /var/run/news/LOCK.innwatch >/dev/null 2>&1
81 if [ -f /var/run/news/infeed.pid ]; then
82 msg_stopping "INN Feed"
84 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
87 if [ -f /var/run/news/actived.pid ]; then
88 msg_stopping "INN Actived"
90 rm -f /var/run/news/actived.pid >/dev/null 2>&1
93 rm -f /var/lock/subsys/inn >/dev/null 2>&1
103 if [ -f /var/lock/subsys/inn ]; then
106 ctlinnd reload all "Reloading" >/dev/null 2>&1;
107 [ $? -ne 0 ] && RETVAL=7
108 [ $RETVAL -eq 0 ] && ok || died
110 msg_not_running INN >&2
120 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"