New package: webhook-2.8.0
This commit is contained in:
parent
0405a7b24c
commit
7f18f76228
5 changed files with 58 additions and 0 deletions
8
srcpkgs/webhook/files/hooks.json
Normal file
8
srcpkgs/webhook/files/hooks.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
"id": "example",
|
||||
"execute-command": "/bin/date",
|
||||
"command-working-directory": "",
|
||||
"include-command-output-in-response": true
|
||||
}
|
||||
]
|
12
srcpkgs/webhook/files/webhook/conf
Normal file
12
srcpkgs/webhook/files/webhook/conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
# A list of paths to json/yaml files containing definitions of hooks webhook should serve.
|
||||
# Each filepath should be separated by whitespace, and quoted if needed.
|
||||
#
|
||||
# Default: /etc/webhook/hooks.json
|
||||
#
|
||||
# HOOKS_FILES="/etc/webhook/hooks.json"
|
||||
|
||||
# Options to pass to webhook, see webhook -h for more info
|
||||
#
|
||||
# Default: -hotreload -verbose
|
||||
#
|
||||
# OPTS=""
|
2
srcpkgs/webhook/files/webhook/log/run
Normal file
2
srcpkgs/webhook/files/webhook/log/run
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec vlogger -p daemon.info -t webhook
|
12
srcpkgs/webhook/files/webhook/run
Normal file
12
srcpkgs/webhook/files/webhook/run
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
exec 2>&1
|
||||
|
||||
[ -r ./conf ] && . ./conf
|
||||
|
||||
OPTS=${OPTS:- -hotreload -verbose}
|
||||
|
||||
for f in ${HOOKS_FILES:-/etc/webhook/hooks.json}; do
|
||||
OPTS="$OPTS -hooks $f"
|
||||
done
|
||||
|
||||
exec chpst -u _webhook:_webhook webhook $OPTS
|
24
srcpkgs/webhook/template
Normal file
24
srcpkgs/webhook/template
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Template file for 'webhook'
|
||||
pkgname=webhook
|
||||
version=2.8.0
|
||||
revision=1
|
||||
build_style=go
|
||||
go_import_path="github.com/adnanh/webhook"
|
||||
short_desc="Lightweight incoming webhook server to run shell commands"
|
||||
maintainer="Abigail G <dev@kb6.ee>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/adnanh/webhook"
|
||||
distfiles="https://github.com/adnanh/webhook/archive/${version}.tar.gz"
|
||||
checksum=c521558083f96bcefef16575a6f3f98ac79c0160fd0073be5e76d6645e068398
|
||||
conf_files="/etc/webhook/hooks.json /etc/sv/webhook/conf"
|
||||
system_accounts="_webhook"
|
||||
system_groups="_webhook"
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
vsv webhook
|
||||
|
||||
vinstall ${FILESDIR}/hooks.json 644 etc/webhook
|
||||
for f in docs/*.md; do vdoc $f; done
|
||||
for f in *.example; do vsconf $f ${f%.example}; done
|
||||
}
|
Loading…
Reference in a new issue