summaryrefslogtreecommitdiff
path: root/network/DenyHosts
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-06-03 02:44:04 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-06-03 02:44:04 +0700
commite382f078ffeb1b2c8288b4395732157edadc94e2 (patch)
tree37159aeeba79fe7d782f2e327e2513ba1b9722e0 /network/DenyHosts
parentb987bdb3d82f8c2d571e4ec2339a7508fbc7fd4b (diff)
downloadslackbuilds-e382f078ffeb1b2c8288b4395732157edadc94e2.tar.gz
network/DenyHosts: Add missing rc.denyhosts.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/DenyHosts')
-rw-r--r--network/DenyHosts/rc.denyhosts47
1 files changed, 47 insertions, 0 deletions
diff --git a/network/DenyHosts/rc.denyhosts b/network/DenyHosts/rc.denyhosts
new file mode 100644
index 0000000000..c892626aaa
--- /dev/null
+++ b/network/DenyHosts/rc.denyhosts
@@ -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