mirror of
https://github.com/Ponce/slackbuilds
synced 2024-09-29 17:37:55 +02:00
network/DenyHosts: Add missing rc.denyhosts.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
b987bdb3d8
commit
e382f078ff
1 changed files with 47 additions and 0 deletions
47
network/DenyHosts/rc.denyhosts
Normal file
47
network/DenyHosts/rc.denyhosts
Normal file
|
@ -0,0 +1,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
|
Loading…
Reference in a new issue