3 # innd InterNet News System
7 # description: inn is the most popular server for Usenet news. It allows \
8 # you to setup local news servers. It can be difficult to \
9 # set up properly though, so be sure to read /usr/doc/inn* \
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/inn ] && . /etc/sysconfig/inn
22 # Check that networking is up.
23 [ "${NETWORKING}" = "no" ] && echo "Error: Networking is down"; exit 0
26 [ -d /etc/news ] || exit 0
27 [ -d /usr/lib/news ] || exit 0
28 [ -d /var/spool/news ] || exit 0
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/news ]; then
37 su news -c /etc/rc.d/rc.new
39 echo "portmap already is running"
41 touch /var/lock/subsys/news
44 echo -n "Stopping INND service: "
45 su news -c "/usr/lib/news/bin/ctlinnd shutdown 'stop required'" &
46 # give it a try to die gracefuly
48 # just in case innd didn't die gracefully
49 if [ -f /var/run/news/innd.pid ]
51 kill -9 `cat /var/run/news/innd.pid`
52 rm -f /var/run/news/innd.pid
54 # always echo that INND is shut down
56 if [ -f /var/run/news/innwatch.pid ]
58 kill -9 `cat /var/run/news/innwatch.pid`
59 rm -f /var/run/news/innwatch.pid
63 rm -f /var/lock/subsys/news /var/lock/news/*
73 kill -HUP `cat /var/run/news/innd.pid`
76 echo "Usage: $0 {start|stop|status|restart|reload}"