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 [ "${NETWORKING}" = "no" ] && exit 0
23 # See how we were called.
26 if [ ! -f /var/lock/subsys/inn ]; then
27 show Starting INN service
29 if `echo $DOINNWATCH | grep -q -e "[tTyY].*"`; then
30 show Starting INN Watch service
32 su - news -c "/usr/bin/innwatch &"
33 if ps ax | grep -v grep | grep -q innwatch; then
40 echo 'INND is running'
42 touch /var/lock/subsys/inn
45 if [ -f /var/run/news/innd.pid ]; then
46 show Stopping INN service
48 if ctlinnd shutdown "Stopping INN service"; then
55 if [ -f /var/run/news/innwatch.pid ]; then
56 show Stopping INN Watch service
58 if killall -9 innwatch; then
63 rm -f /var/run/news/innwatch.pid /var/run/news/LOCK.innwatch
66 if [ -f /var/run/news/infeed.pid ]; then
67 show Stopping INN Feed service
69 rm -f /var/run/news/innfeed.pid
72 if [ -f /var/run/news/actived.pid ]; then
73 show Stopping INN Actived service
75 rm -f /var/run/news/actived.pid
78 rm -f /var/lock/subsys/inn
84 show Reloading INND service
92 echo "Usage: $0 {start|stop|status|restart}"