]> git.pld-linux.org Git - packages/dante.git/blame - sockd.init
- use new %doc.
[packages/dante.git] / sockd.init
CommitLineData
30b7a6a0 1#!/bin/sh
2#
3# sockd This shell script takes care of starting and stopping
4# the Dante server.
5#
6# chkconfig: 2345 65 35
7# description: sockd implements a socks v4/v5 proxy server
8#
9# processname: sockd
10# pidfile: /var/run/sockd.pid
11
12
13# Source function library
14. /etc/rc.d/init.d/functions
15
16# Get network config
17. /etc/sysconfig/network
18
19# Get service config
20[ -f /etc/sysconfig/sockd ] && . /etc/sysconfig/sockd
21
22# Check that networking is up.
23if is_no "${NETWORKING}"; then
24 # nls "ERROR: Networking is down. %s can't be run." <service>
25 msg_Network_Down sockdd
26 exit 1
27fi
28
29# See how we were called.
30case "$1" in
31 start)
32 # Check if the service is already running?
33 if [ ! -f /var/lock/subsys/sockd ]; then
34 msg_starting sockd
35 daemon sockd -D
36 RETVAL=$?
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sockd
38 else
39 msg_Already_Running sockd
40 exit 1
41 fi
42 ;;
43 stop)
44 # Stop daemons.
45 if [ -f /var/lock/subsys/sockd ]; then
46 msg_stopping sockd
47 killproc sockd
48 rm -f /var/lock/subsys/sockd /var/run/sockd.pid >/dev/null 2>&1
49 else
50 msg_Not_Running sockd
51 exit 1
52 fi
53 ;;
54 status)
55 status sockd
56 exit $?
57 ;;
58 restart|reload)
59 $0 stop
60 $0 start
61 ;;
62 *)
63 msg_Usage "$0 {start|stop|restart|status}"
64 exit 1
65 ;;
66esac
67
68exit $RETVAL
This page took 0.073271 seconds and 4 git commands to generate.