summaryrefslogtreecommitdiff
path: root/net-misc/endlessh/files/endlessh.initd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /net-misc/endlessh/files/endlessh.initd
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'net-misc/endlessh/files/endlessh.initd')
-rw-r--r--net-misc/endlessh/files/endlessh.initd30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-misc/endlessh/files/endlessh.initd b/net-misc/endlessh/files/endlessh.initd
new file mode 100644
index 000000000000..1639c57348c4
--- /dev/null
+++ b/net-misc/endlessh/files/endlessh.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 2019-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ after bootmisc
+ need localmount
+ use clock logger net
+}
+
+description="Starts endlessh tarpit"
+
+command="/usr/bin/endlessh"
+# NOTE: You will need to add -s to ENDLESSH_ARGS in /etc/conf.d/endlessh if modified to keep syslog
+command_args="${ENDLESSH_ARGS:--sv}"
+command_background="true"
+extra_started_commands="dumpstats reload"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+dumpstats() {
+ ebegin "Dumping connection stats of ${RC_SVCNAME} to log"
+ start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}"
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME} configuration"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}