3 # <service> <service> short service description
5 # chkconfig: 345 <start_level> <stop_level>
7 # description: <service> long service description
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
23 # Get service config - may override defaults
24 [ -f /etc/sysconfig/<service> ] && . /etc/sysconfig/<service>
26 # Check that networking is up.
27 if is_yes "${NETWORKING}"; then
28 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
29 msg_network_down <service>
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/<service> ]; then
39 msg_starting <service>
40 daemon /usr/sbin/<service>
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/<service>
44 msg_already_running <service>
49 if [ -f /var/lock/subsys/<service> ]; then
51 msg_stopping <service>
53 killproc --pidfile /var/run/<service>.pid <service> -TERM
54 rm -f /var/lock/subsys/<service>
56 msg_not_running <service>
61 if [ -f /var/lock/subsys/<service> ]; then
62 msg_reloading <service>
63 killproc <service> -HUP
64 killproc --pidfile /var/run/<service>.pid <service> -HUP
67 msg_not_running <service>
73 # See how we were called.
88 # ONLY if program allows reloading without stopping
89 # otherwise include force-reload with 'reload'
98 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"