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 if [ "${NETWORKING}" = "no" ]; then
24 echo "WARNING: Networking is down. Inn service can't be runed "
29 [ -d /etc/news ] || exit 0
30 [ -d /usr/lib/news ] || exit 0
31 [ -d /var/spool/news ] || exit 0
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/news ]; then
40 su news -c /etc/rc.d/rc.new
42 echo "portmap already is running"
44 touch /var/lock/subsys/news
47 echo -n "Stopping INND service: "
48 su news -c "/usr/lib/news/bin/ctlinnd shutdown 'stop required'" &
49 # give it a try to die gracefuly
51 # just in case innd didn't die gracefully
52 if [ -f /var/run/news/innd.pid ]
54 kill -9 `cat /var/run/news/innd.pid`
55 rm -f /var/run/news/innd.pid
57 # always echo that INND is shut down
59 if [ -f /var/run/news/innwatch.pid ]
61 kill -9 `cat /var/run/news/innwatch.pid`
62 rm -f /var/run/news/innwatch.pid
66 rm -f /var/lock/subsys/news /var/lock/news/*
76 kill -HUP `cat /var/run/news/innd.pid`
79 echo "Usage: $0 {start|stop|status|restart|reload}"