diff options
Diffstat (limited to 'dev-util/webhook/files')
-rw-r--r-- | dev-util/webhook/files/webhook.confd | 2 | ||||
-rw-r--r-- | dev-util/webhook/files/webhook.initd | 22 | ||||
-rw-r--r-- | dev-util/webhook/files/webhook.json.example | 13 | ||||
-rw-r--r-- | dev-util/webhook/files/webhook.logrotated | 3 |
4 files changed, 40 insertions, 0 deletions
diff --git a/dev-util/webhook/files/webhook.confd b/dev-util/webhook/files/webhook.confd new file mode 100644 index 000000000000..6cc27e091955 --- /dev/null +++ b/dev-util/webhook/files/webhook.confd @@ -0,0 +1,2 @@ +# arguments for webhook +command_args="-ip=localhost -port=9000 -hooks=/etc/webhook.json -logfile=/var/log/webhook.log" 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 $? +} diff --git a/dev-util/webhook/files/webhook.json.example b/dev-util/webhook/files/webhook.json.example new file mode 100644 index 000000000000..12a314522595 --- /dev/null +++ b/dev-util/webhook/files/webhook.json.example @@ -0,0 +1,13 @@ +[ + { + "id": "example", + "execute-command": "/var/lib/webhooks/example.sh", + "command-working-directory": "/var/lib/webhooks" + "pass-arguments-to-command": + [ + { + "source": "entire-payload" + } + ] + } +] diff --git a/dev-util/webhook/files/webhook.logrotated b/dev-util/webhook/files/webhook.logrotated new file mode 100644 index 000000000000..7a6dd20b3ceb --- /dev/null +++ b/dev-util/webhook/files/webhook.logrotated @@ -0,0 +1,3 @@ +/var/log/webhook.log +{ +} |