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"
31 # See how we were called.
34 if [ ! -f /var/lock/subsys/inn ]; then
35 grep -v "#" /etc/news/inn.conf | grep ovmethod | grep ovdb 2>&1 >/dev/null
37 if [ $RETVAL -eq 0 ]; then
38 msg_starting "INN ovdb_monitor"
39 su news -c ovdb_init 2>&1 > /dev/null
44 daemon su news -c inndstart
45 if is_yes "$DOINNWATCH" ; then
46 msg_starting "INN Watch"
49 /usr/bin/setsid /usr/bin/innwatch &" </dev/null >&0 2>&0
51 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/inn
52 ps -C innwatch >/dev/null 2>&1 || usleep 500000
53 if [ $RETVAL -eq 0 ] && ps -C innwatch >/dev/null 2>&1; then
55 touch /var/lock/subsys/inn
61 touch /var/lock/subsys/inn
64 msg_already_running "INN"
68 if [ -f /var/lock/subsys/inn ]; then
71 if ctlinnd shutdown "Stopping INN service"; then
77 if [ -f /var/run/news/innwatch.pid ]; then
78 msg_stopping "INN Watch"
80 if killall -9 innwatch; then
85 rm -f /var/run/news/innwatch.pid \
86 /var/run/news/LOCK.innwatch >/dev/null 2>&1
89 if [ -f /var/run/news/infeed.pid ]; then
90 msg_stopping "INN Feed"
92 rm -f /var/run/news/innfeed.pid >/dev/null 2>&1
95 if [ -f /var/run/news/actived.pid ]; then
96 msg_stopping "INN Actived"
98 rm -f /var/run/news/actived.pid >/dev/null 2>&1
101 if [ -f /var/run/news/ovdb_monitor.pid ]; then
102 msg_stopping "INN ovdb_monitor"
103 killproc ovdb_monitor -15
106 rm -f /var/lock/subsys/inn >/dev/null 2>&1
117 if [ -f /var/lock/subsys/inn ]; then
120 ctlinnd reload all "Reloading" >/dev/null 2>&1;
121 [ $? -ne 0 ] && RETVAL=7
122 [ $RETVAL -eq 0 ] && ok || died
124 msg_not_running INN >&2
134 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"