+++ /dev/null
-#! /bin/sh
-#
-# innd InterNet News System
-#
-# chkconfig: 345 95 25
-#
-# description: inn is the most popular server for Usenet news. It allows \
-# you to setup local news servers. It can be difficult to \
-# set up properly though, so be sure to read /usr/doc/inn* \
-# before trying.
-
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-# Get network config
-. /etc/sysconfig/network
-
-# Get service config
-[ -f /etc/sysconfig/inn ] && . /etc/sysconfig/inn
-
-# Check that networking is up.
-if [ "${NETWORKING}" = "no" ]; then
- echo "WARNING: Networking is down. Inn service can't be runed "
- exit 1
-fi
-
-# Sanity check
-[ -d /etc/news ] || exit 0
-[ -d /usr/lib/news ] || exit 0
-[ -d /var/spool/news ] || exit 0
-
-
-# See how we were called.
-case "$1" in
- start)
- # Check if the service is already running?
- if [ ! -f /var/lock/subsys/news ]; then
- show Starting INND
- su news -c /etc/rc.d/rc.new
- else
- echo "portmap already is running"
- fi
- touch /var/lock/subsys/news
- ;;
- stop)
- echo -n "Stopping INND service: "
- su news -c "/usr/lib/news/bin/ctlinnd shutdown 'stop required'" &
- # give it a try to die gracefuly
- sleep 5
- # just in case innd didn't die gracefully
- if [ -f /var/run/news/innd.pid ]
- then
- kill -9 `cat /var/run/news/innd.pid`
- rm -f /var/run/news/innd.pid
- fi
- # always echo that INND is shut down
- echo -n "innd "
- if [ -f /var/run/news/innwatch.pid ]
- then
- kill -9 `cat /var/run/news/innwatch.pid`
- rm -f /var/run/news/innwatch.pid
- echo -n "innwatch "
- fi
- echo
- rm -f /var/lock/subsys/news /var/lock/news/*
- ;;
- status)
- status innd
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- reload)
- kill -HUP `cat /var/run/news/innd.pid`
- ;;
- *)
- echo "Usage: $0 {start|stop|status|restart|reload}"
- exit 1
-esac
-
-exit 0