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"
40 su news -c "umask 002 ; /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
43 ps -C innwatch >/dev/null 2>&1 || usleep 500000
44 if ps -C innwatch >/dev/null 2>&1; then
50 touch /var/lock/subsys/inn
53 msg_already_running "INN"
58 if [ -f /var/lock/subsys/inn ]; then
61 if ctlinnd shutdown "Stopping INN service";then
67 if [ -f /var/run/news/innwatch.pid ]; then
68 msg_stopping "INN Watch"
70 if killall -9 innwatch; then
75 rm -f /var/run/news/innwatch.pid \
76 /var/run/news/LOCK.innwatch >/dev/null 2>&1
79 if [ -f /var/run/news/infeed.pid ]; then
80 msg_stopping "INN Feed"
82 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
85 if [ -f /var/run/news/actived.pid ]; then
86 msg_stopping "INN Actived"
88 rm -f /var/run/news/actived.pid >/dev/null 2>&1
95 rm -f /var/lock/subsys/inn >/dev/null 2>&1
101 if [ -f /var/lock/subsys/inn ]; then
104 ctlinnd reload all "Reloading" >/dev/null 2>&1;
106 [ $RETVAL -eq 0 ] && ok || died
118 msg_usage "$0 {start|stop|restart|reload|status}"