2 # Stolen from PLD Linux
4 # doldacond: Direct Connect client as daemon
8 # description: doldacond
10 # config: /etc/sysconfig/doldacond
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 if [ -f /etc/sysconfig/doldacond ]; then
17 . /etc/sysconfig/doldacond
20 # Check that networking is up.
21 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
22 msg_network_down doldacon
26 # See how we were called.
29 # Check if service is already running?
30 if [ ! -f /var/lock/subsys/doldacond ]; then
31 msg_starting doldacond
32 daemon doldacond -C /etc/doldaconnect/doldacond.conf -p /var/run/doldacond.pid ${ADD_OPT}
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/doldacond
36 msg_already_running doldacond
40 if [ -f /var/lock/subsys/doldacond ]; then
41 msg_stopping doldacond
42 killproc --pidfile /var/run/doldacond.pid doldacond
43 rm -f /var/lock/subsys/doldacond
45 msg_not_running doldacond
53 if [ -f /var/lock/subsys/doldacond ]; then
54 msg_reloading doldacond
55 killproc --pidfile /var/run/doldacond.pid doldacond -HUP
58 msg_not_running doldacond
67 msg_usage "$0 {start|stop|restart|force-reload|status}"