3 # sockd This shell script takes care of starting and stopping
6 # chkconfig: 2345 65 35
7 # description: sockd implements a socks v4/v5 proxy server
10 # pidfile: /var/run/sockd.pid
13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/sockd ] && . /etc/sysconfig/sockd
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25 msg_network_down sockdd
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/sockd ]; then
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sockd
40 msg_already_running sockd
45 if [ -f /var/lock/subsys/sockd ]; then
48 rm -f /var/lock/subsys/sockd /var/run/sockd.pid >/dev/null 2>&1
55 if [ ! -f /var/lock/subsys/sockd ]; then
65 # See how we were called.
88 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"