summaryrefslogtreecommitdiff
path: root/net-misc/knock/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/knock/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/knock/files')
-rw-r--r--net-misc/knock/files/knockd.confd.28
-rw-r--r--net-misc/knock/files/knockd.initd.224
2 files changed, 32 insertions, 0 deletions
diff --git a/net-misc/knock/files/knockd.confd.2 b/net-misc/knock/files/knockd.confd.2
new file mode 100644
index 000000000000..335a522fccb9
--- /dev/null
+++ b/net-misc/knock/files/knockd.confd.2
@@ -0,0 +1,8 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# interface to listen to
+IFACE="eth0"
+
+# extra options for knockd daemon
+OPTS=""
diff --git a/net-misc/knock/files/knockd.initd.2 b/net-misc/knock/files/knockd.initd.2
new file mode 100644
index 000000000000..1d80f5980afc
--- /dev/null
+++ b/net-misc/knock/files/knockd.initd.2
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+: ${CONFIGFILE:=/etc/knockd.conf}
+: ${IFACE:=eth0}
+
+get_config() {
+ [ -f ${CONFIGFILE} ] && conf=$(awk 'tolower($1) == "'$1'" { print $3 }' ${CONFIGFILE})
+
+ echo ${conf:-$2}
+}
+
+depend() {
+ need net
+ use net.${IFACE}
+
+ [ "$(get_config usesyslog no)" != "no" ] && use logger
+}
+
+pidfile=$(get_config pidfile /var/run/knockd.pid)
+
+command=/usr/sbin/knockd
+command_args="-d -i ${IFACE} ${OPTS}"