blob: c892626aaad6d8e9bf74e296414caa6193c9fe09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
# Start/stop/restart Deny Hosts
# Start Deny Hosts:
CMDLINE=/usr/sbin/daemon-control
dnh_start() {
echo Starting Deny Hosts daemon: $CMDLINE
$CMDLINE start
echo
}
# Stop Deny Hosts:
dnh_stop() {
echo Stopping Deny Hosts daemon: $CMDLINE
$CMDLINE stop
echo
}
# Restart Deny Hosts:
dnh_restart() {
dnh_stop
sleep 1
dnh_start
}
# Check if Deny Hosts is running
dnh_status() {
$CMDLINE status
echo
}
case $1 in
'start')
dnh_start
;;
'stop')
dnh_stop
;;
'restart')
dnh_restart
;;
'status')
dnh_status
;;
'*')
echo usage $0 start|stop|restart|status
esac
|