3 # newscache newscache - news caching daemon
7 # description: NewsCache acts to news reading clients like a news server,\
8 # except that it stores only those articles that have been\
9 # requested by at least one client. NewsCache targets problems\
10 # of the current News System like network bandwidth consumption\
11 # or the IO load caused by news clients.
14 # Source function library
15 . /etc/rc.d/init.d/functions
18 . /etc/sysconfig/network
20 # Get service config - may override defaults
21 [ -f /etc/sysconfig/newscache ] && . /etc/sysconfig/newscache
23 # Check that networking is up.
24 if is_yes "${NETWORKING}"; then
25 if [ ! -f /var/lock/subsys/network ]; then
26 # nls "ERROR: Networking is down. %s can't be run." newscache
27 msg_network_down newscache
35 # See how we were called.
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/newscache ]; then
40 # show "Starting %s service" newscache
41 msg_starting newscache
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/newscache
46 # show "%s service is already running." newscache
47 msg_already_running newscache
51 if [ -f /var/lock/subsys/newscache ]; then
53 # show "Stopping %s service" newscache
54 msg_stopping newscache
56 rm -f /var/lock/subsys/newscache
58 # show "%s service is not running." newscache
59 msg_not_running newscache
68 if [ -f /var/lock/subsys/newscache ]; then
69 # show "Reload %s service" newscache
70 msg_reloading newscache
71 killproc newscache -HUP
74 # show "%s service is not running." newscache
75 msg_not_running newscache >&2
80 # if program allows reloading without stopping
93 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
94 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
100 # This must be last line !
101 # vi:syntax=sh:tw=78:ts=8:sw=4