#! /bin/sh # # innd InterNet News System # # chkconfig: 345 95 05 # 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 # Source networking configuration. . /etc/sysconfig/network # Daemon specific . /usr/share/news/innshellvars # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 0 # See how we were called. case "$1" in start) if [ ! -f /var/lock/subsys/inn ]; then show Starting INN service busy rm -f ${SERVERPID} su - news -c ". /etc/rc.d/init.d/functions; daemon ${INNDSTART} ${INNFLAGS}" DOINNWATCH=`echo ${DOINNWATCH} | tr A-Z a-z` if [ -z "${DOINNWATCH}" -o "${DOINNWATCH}" = "on" \ -o "${DOINNWATCH}" = "true" -o "${DOINNWATCH}" = "yes" ]; then show Starting INNWatch service busy su - news -c ". /etc/rc.d/init.d/functions; daemon /usr/bin/innwatch" fi DOCNFSSTAT=`echo ${DOCNFSSTAT} | tr A-Z a-z` if [ -z "${DOCNFSSTAT}" -o "${DOCNFSSTAT}" = "on" \ -o "${DOCNFSSTAT}" = "true" -o "${DOCNFSSTAT}" = "yes" ]; then show Starting CNFSstat service busy su - news -c ". /etc/rc.d/init.d/functions; daemon /usr/bin/cnfsstat -s -l" fi else echo 'INND is running' fi touch /var/lock/subsys/inn ;; stop) if [ -f /var/run/news/innd.pid ]; then show Stopping INND service killproc innd rm -f /var/run/news/innd.pid fi if [ -f /var/run/news/innwatch.pid ]; then show Stopping INNWatch service killproc innwatch -9 rm -f /var/run/news/innwatach.pid fi if [ -f /var/run/news/infeed.pid ]; then show Stopping INNFeed service killproc innfeed -9 rm -f /var/run/news/infeed.pid fi if [ -f /var/run/news/actived.pid ]; then show Stopping INN Actived service killproc actived -9 rm -f /var/run/news/actived.pid fi if [ -f /var/run/news/cnfstat.pid ]; then show Stopping CNFSstat service killproc cnfsstat -9 rm -f /var/run/news/cnfstat.pid fi rm -f /var/lock/subsys/inn ;; status) status innd ;; reload) show Reloading INND service killproc innd -HUP ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|status|restart}" exit 1 ;; esac exit 0