3 # innd InterNet News System
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* \
11 # Source function library.
12 . /etc/rc.d/init.d/functions
14 # Source networking configuration.
15 . /etc/sysconfig/network
18 . /usr/share/news/innshellvars
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "INN"
30 if [ ! -f /var/lock/subsys/inn ]; then
31 grep -v "#" /etc/news/inn.conf | grep ovmethod | grep ovdb 2>&1 >/dev/null
33 if [ $RETVAL -eq 0 ]; then
34 msg_starting "INN ovdb_monitor"
35 su news -c ovdb_init 2>&1 > /dev/null
40 daemon --user=news inndstart
41 if is_yes "$DOINNWATCH" ; then
42 msg_starting "INN Watch"
45 /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
47 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
48 ps -C innwatch >/dev/null 2>&1 || usleep 500000
49 if [ $RETVAL -eq 0 ] && ps -C innwatch >/dev/null 2>&1; then
51 touch /var/lock/subsys/inn
57 touch /var/lock/subsys/inn
60 msg_already_running "INN"
65 if [ -f /var/lock/subsys/inn ]; then
68 if ctlinnd shutdown "Stopping INN service"; then
74 if [ -f /var/run/news/innwatch.pid ]; then
75 msg_stopping "INN Watch"
77 if killall -9 innwatch; then
82 rm -f /var/run/news/innwatch.pid \
83 /var/run/news/LOCK.innwatch >/dev/null 2>&1
86 if [ -f /var/run/news/infeed.pid ]; then
87 msg_stopping "INN Feed"
89 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
92 if [ -f /var/run/news/actived.pid ]; then
93 msg_stopping "INN Actived"
95 rm -f /var/run/news/actived.pid >/dev/null 2>&1
98 if [ -f /var/run/news/ovdb_monitor.pid ]; then
99 msg_stopping "INN ovdb_monitor"
100 killproc ovdb_monitor -15
103 rm -f /var/lock/subsys/inn >/dev/null 2>&1
111 # See how we were called.
121 if [ $? -eq 0 ]; then
126 if [ -f /var/lock/subsys/inn ]; then
129 ctlinnd reload all "Reloading" >/dev/null 2>&1;
130 [ $? -ne 0 ] && RETVAL=7
131 [ $RETVAL -eq 0 ] && ok || died
133 msg_not_running INN >&2
143 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"