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_no "${NETWORKING}"; then
22 msg_network_down "INN"
27 # See how we were called.
30 if [ ! -f /var/lock/subsys/inn ]; then
32 daemon su news -c inndstart
33 if is_yes $DOINNWATCH ; then
34 msg_starting "INN Watch"
36 su news -c "umask 002 ; /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
39 ps -C innwatch >/dev/null 2>&1 || usleep 500000
40 if ps -C innwatch >/dev/null 2>&1; then
46 touch /var/lock/subsys/inn
49 msg_already_running "INN"
54 if [ -f /var/lock/subsys/inn ]; then
57 if ctlinnd shutdown "Stopping INN service";then
63 if [ -f /var/run/news/innwatch.pid ]; then
64 msg_stopping "INN Watch"
66 if killall -9 innwatch; then
71 rm -f /var/run/news/innwatch.pid \
72 /var/run/news/LOCK.innwatch >/dev/null 2>&1
75 if [ -f /var/run/news/infeed.pid ]; then
76 msg_stopping "INN Feed"
78 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
81 if [ -f /var/run/news/actived.pid ]; then
82 msg_stopping "INN Actived"
84 rm -f /var/run/news/actived.pid >/dev/null 2>&1
91 rm -f /var/lock/subsys/inn >/dev/null 2>&1
97 if [ -f /var/lock/subsys/inn ]; then
100 if ctlinnd reload all "Reloading" >/dev/null 2>&1; then
116 msg_usage "$0 {start|stop|status|restart|reload}"