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 != stop -a != status ]; then
25 # nls "ERROR: Networking is down. %s can't be run." <service>
26 msg_network_down sockdd
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/sockd ]; then
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sockd
44 msg_already_running sockd
49 if [ -f /var/lock/subsys/sockd ]; then
52 rm -f /var/lock/subsys/sockd /var/run/sockd.pid >/dev/null 2>&1
67 msg_usage "$0 {start|stop|restart|force-reload|status}"