summaryrefslogtreecommitdiff
path: root/dev-util/webhook/files/webhook.initd
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/webhook/files/webhook.initd')
-rw-r--r--dev-util/webhook/files/webhook.initd22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-util/webhook/files/webhook.initd b/dev-util/webhook/files/webhook.initd
new file mode 100644
index 000000000000..d87e8cce035f
--- /dev/null
+++ b/dev-util/webhook/files/webhook.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2016-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Webhook server"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+
+command="/usr/bin/webhook"
+command_args="${command_args}"
+command_background="true"
+extra_started_commands="reload"
+start_stop_daemon_args=""
+
+depend() {
+ after net
+}
+
+reload() {
+ ebegin "Reloading webhooks"
+ start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
+ eend $?
+}