source: trunk/tools/whoind/debian/init @ 117

Revision 117, 1.3 KB checked in by paravoid, 6 years ago (diff)

Add WHOIS server (whoind) to revision control

Line 
1#! /bin/sh
2#
3# whoind init.d script
4# Copyright (c) 2005, Faidon Liambotis <faidon@cube.gr>
5#
6# You are allowed to use, copy, modify, distribute this file
7# without any restrictions whatsoever.
8# It is provided WITHOUT ANY WARRANTY; use it at your own risk.
9
10if [ -f /etc/default/whoind ] ; then
11        . /etc/default/whoind
12fi
13
14PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
15DAEMON=/usr/sbin/whoind
16DAEMON_OPTS="$DAEMON_OPTS --daemon --config=/etc/whoind.conf"
17PIDFILE=/var/run/whoind/whoind.pid
18NAME=whoind
19DESC="WiND WHOIS Server"
20
21test -x $DAEMON || exit 0
22
23set -e
24
25case "$1" in
26  start)
27        echo -n "Starting $DESC: "
28        echo -n "$NAME";
29        if start-stop-daemon --start --quiet --exec $DAEMON --pidfile $PIDFILE \
30                -- $DAEMON_OPTS > /dev/null; then
31                echo "."
32                exit 0 # EXIT_SUCCESS
33        else
34                echo "...failed."
35                exit 1 # EXIT_FAILURE
36        fi
37        ;;
38  stop)
39        echo -n "Stopping $DESC: "
40        echo -n "$NAME"
41        start-stop-daemon --stop --quiet --pidfile $PIDFILE || true
42        echo "."
43        ;;
44  reload)
45        echo -n "Reloading $DESC: "
46        echo -n "$NAME";
47        start-stop-daemon --stop --quiet --pidfile $PIDFILE --signal 1 || true
48        echo "."
49        ;;
50  restart|force-reload)
51        $0 stop
52        sleep 1
53        $0 start
54        ;;
55  *)
56        N=/etc/init.d/$NAME
57        echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
58        exit 1
59        ;;
60esac
61
62exit 0
Note: See TracBrowser for help on using the repository browser.