summaryrefslogtreecommitdiffstats
path: root/extra/knock/knockd
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2010-11-06 18:59:44 +0100
committertnut <thierryn1 at hispeed dot ch>2010-11-06 18:59:44 +0100
commit5b1b01086284b18a85e795d2ba18ec8d3d21a7e7 (patch)
treebe89ee0150065f290499a45c34f066f46fc2bd2f /extra/knock/knockd
parent2e1e40c963b2a73d7e38fe2ea09c7dbed39c3bc4 (diff)
downloadnutyx-extra-5b1b01086284b18a85e795d2ba18ec8d3d21a7e7.tar.gz
nutyx-extra-5b1b01086284b18a85e795d2ba18ec8d3d21a7e7.tar.bz2
nutyx-extra-5b1b01086284b18a85e795d2ba18ec8d3d21a7e7.tar.xz
nutyx-extra-5b1b01086284b18a85e795d2ba18ec8d3d21a7e7.zip
knock, ajoute du service et man pages au bon endroit
Diffstat (limited to 'extra/knock/knockd')
-rw-r--r--extra/knock/knockd37
1 files changed, 37 insertions, 0 deletions
diff --git a/extra/knock/knockd b/extra/knock/knockd
new file mode 100644
index 000000000..413e77a70
--- /dev/null
+++ b/extra/knock/knockd
@@ -0,0 +1,37 @@
+#!/bin/sh
+. /etc/sysconfig/rc
+. $rc_functions
+
+pidfile=/var/run/knockd.pid
+
+case "$1" in
+ start)
+ boot_mesg "Starting KNOCKD Server..."
+ loadproc /usr/sbin/knockd -d;;
+
+ stop)
+ boot_mesg "Stopping KNOCKD Server..."
+ killproc /usr/sbin/knockd
+ ;;
+
+ reload)
+ boot_mesg "Reloading KNOCKD Server..."
+ reloadproc /usr/sbin/knockd
+ ;;
+
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+
+ status)
+ statusproc /usr/sbin/knockd
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|reload|restart|status}"
+ exit 1
+ ;;
+esac
+