]> git.pld-linux.org Git - packages/inn.git/blob - inn.init
small fixes
[packages/inn.git] / inn.init
1 #! /bin/sh
2 #
3 # innd          InterNet News System
4 #
5 # chkconfig: 345 95 05
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* \
9 #              before trying.
10
11 # Source function library.
12 . /etc/rc.d/init.d/functions
13
14 # Source networking configuration.
15 . /etc/sysconfig/network
16
17 # Daemon specific
18 . /usr/share/news/innshellvars
19
20 # Check that networking is up.
21 [ "${NETWORKING}" = "no" ] && exit 0
22
23 # See how we were called.
24 case "$1" in
25   start)
26         if [ ! -f /var/lock/subsys/inn ]; then
27             show Starting INN service
28             daemon inndstart
29
30 #           DOINNWATCH=`echo ${DOINNWATCH} | tr A-Z a-z`
31 #           if [ -z "${DOINNWATCH}" -o "${DOINNWATCH}" = "on" -o "${DOINNWATCH}" = "true" -o "${DOINNWATCH}" = "yes" ]; then
32 #               show Starting INN Watch service
33 #               busy
34 #               /usr/bin/innwatch &
35 #               deltext;ok
36 #           fi
37         else
38             echo 'INND is running'
39         fi
40         touch /var/lock/subsys/inn
41         ;;
42   stop)
43         if [ -f /var/run/news/innd.pid ]; then
44             show Stopping INN service
45             killproc innd
46             rm -f /var/run/news/innd.pid
47         fi
48
49 #       if [ -f /var/run/news/innwatch.pid ]; then
50 #           show Stopping INN Watch service
51 #           killproc innwatch -9
52 #           rm -f /var/run/news/innwatch.pid /var/run/news/LOCK.innwatch
53 #       fi
54
55         if [ -f /var/run/news/infeed.pid ]; then
56             show Stopping INN Feed service
57             killproc innfeed -9
58             rm -f /var/run/news/innfeed.pid
59         fi
60
61         if [ -f /var/run/news/actived.pid ]; then
62             show Stopping INN Actived service
63             killproc actived -9
64             rm -f /var/run/news/actived.pid
65         fi
66
67         rm -f /var/lock/subsys/inn
68         ;;
69   status)
70         status innd
71         ;;
72   reload)
73         show Reloading INND service
74         killproc innd -HUP
75         ;;
76   restart)
77         $0 stop
78         $0 start
79         ;;
80   *)
81         echo "Usage: $0 {start|stop|status|restart}"
82         exit 1
83         ;;
84 esac
85
86 exit 0
This page took 0.034775 seconds and 3 git commands to generate.