3 # distcache Startup script for the Distcache SSL Session Cache Client Proxy
6 # description: Distcache is a Distributed SSL Session Cache Client Proxy.
7 # processname: dc_client
8 # config: /etc/sysconfig/distcache
9 # pidfile: /var/run/dc_client.pid
13 # Source function library.
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network ]; then
22 msg_network_down dc_client
30 if [ -f /etc/sysconfig/distcache ]; then
31 . /etc/sysconfig/distcache
35 socket=${SOCKET-/var/cache/mod_ssl/distcache}
36 server=${SERVER-localhost}:${port}
40 dc_client=/usr/bin/dc_client
41 pidfile=/var/run/dc_client.pid
43 OPTIONS="-daemon -pidfile ${pidfile} -listen UNIX:${socket} \
44 -sockowner ${owner} -sockperms 0600 -user ${runas} -server IP:${server}"
46 # See how we were called.
49 # Check if the service is already running?
50 if [ ! -f /var/lock/subsys/dc_client ]; then
51 msg_starting dc_client
52 daemon $dc_client $OPTIONS
54 [ $RETVAL = 0 ] && touch /var/lock/subsys/dc_client
56 msg_already_running dc_client
60 if [ -f /var/lock/subsys/dc_client ]; then
62 msg_stopping dc_client
64 rm -f /var/lock/subsys/dc_client /var/run/dc_client.pid
66 msg_not_running dc_client
73 restart|reload|force-reload)
78 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
84 # This must be last line !
85 # vi:syntax=sh:tw=78:ts=4:sw=4