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 if ps -C innwatch >/dev/null 2>&1; then
45 touch /var/lock/subsys/inn
48 msg_Already_Running "INN"
53 if [ -f /var/lock/subsys/inn ]; then
56 if ctlinnd shutdown "Stopping INN service";then
62 if [ -f /var/run/news/innwatch.pid ]; then
63 msg_stopping "INN Watch"
65 if killall -9 innwatch; then
70 rm -f /var/run/news/innwatch.pid \
71 /var/run/news/LOCK.innwatch >/dev/null 2>&1
74 if [ -f /var/run/news/infeed.pid ]; then
75 msg_stopping "INN Feed"
77 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
80 if [ -f /var/run/news/actived.pid ]; then
81 msg_stopping "INN Actived"
83 rm -f /var/run/news/actived.pid >/dev/null 2>&1
90 rm -f /var/lock/subsys/inn >/dev/null 2>&1
96 if [ -f /var/lock/subsys/inn ]; then
99 if ctlinnd reload all "Reloading" >/dev/null 2>&1; then
115 msg_Usage "$0 {start|stop|status|restart|reload}"