diff --git a/www/webhook/Makefile b/www/webhook/Makefile index 8c80b1df831d..ee625c2eb0dc 100644 --- a/www/webhook/Makefile +++ b/www/webhook/Makefile @@ -1,52 +1,52 @@ PORTNAME= webhook DISTVERSION= 2.8.2 -PORTREVISION= 15 +PORTREVISION= 16 CATEGORIES= www MAINTAINER= stb@lassitu.de COMMENT= Easily create HTTP endpoints (hooks) to execute shell commands WWW= https://github.com/adnanh/webhook LICENSE= APACHE20 BSD3CLAUSE MIT LICENSE_COMB= multi USES= go:modules USE_GITHUB= yes GH_ACCOUNT= adnanh GH_TUPLE= Microsoft:go-winio:v0.6.2:microsoft_go_winio/vendor/github.com/Microsoft/go-winio \ clbanning:mxj:v2.7.0:clbanning_mxj_v2/vendor/github.com/clbanning/mxj/v2 \ coreos:go-systemd:v22.5.0:coreos_go_systemd_v22/vendor/github.com/coreos/go-systemd/v22 \ dustin:go-humanize:v1.0.1:dustin_go_humanize/vendor/github.com/dustin/go-humanize \ fsnotify:fsnotify:v1.7.0:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \ ghodss:yaml:v1.0.0:ghodss_yaml/vendor/github.com/ghodss/yaml \ go-check:check:41f04d3bba15:go_check_check/vendor/gopkg.in/check.v1 \ go-chi:chi:v5.0.12:go_chi_chi_v5/vendor/github.com/go-chi/chi/v5 \ go-yaml:yaml:v2.4.0:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \ gofrs:uuid:v5.0.0:gofrs_uuid_v5/vendor/github.com/gofrs/uuid/v5 \ golang:sys:v0.18.0:golang_sys/vendor/golang.org/x/sys \ google:go-cmp:v0.6.0:google_go_cmp/vendor/github.com/google/go-cmp \ gorilla:mux:v1.8.1:gorilla_mux/vendor/github.com/gorilla/mux \ kr:pretty:v0.1.0:kr_pretty/vendor/github.com/kr/pretty USE_RC_SUBR= webhook GO_TARGET= :${PREFIX}/sbin/webhook PLIST_FILES= "@sample etc/webhook.yaml.sample" \ sbin/webhook .include .if ${OPSYS} == FreeBSD DAEMONARGS= -S -l \$${webhook_facility} -s \$${webhook_priority} -t \ \$${name} .else DAEMONARGS= -f .endif SUB_LIST+= DAEMONARGS="${DAEMONARGS}" post-install: ${INSTALL_DATA} ${FILESDIR}/webhook.yaml ${STAGEDIR}${PREFIX}/etc/webhook.yaml.sample .include diff --git a/www/webhook/files/webhook.in b/www/webhook/files/webhook.in index 3955c1523348..ced979c67abd 100644 --- a/www/webhook/files/webhook.in +++ b/www/webhook/files/webhook.in @@ -1,37 +1,37 @@ #!/bin/sh # PROVIDE: webhook # REQUIRE: NETWORKING SYSLOG # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable webhook: # # webhook_enable="YES" . /etc/rc.subr desc="webhook daemon" name=webhook rcvar=webhook_enable load_rc_config $name : ${webhook_conf:=%%PREFIX%%/etc/webhook.yaml} : ${webhook_enable:=NO} : ${webhook_facility:=daemon} : ${webhook_priority:=debug} : ${webhook_user:=nobody} pidfile=/var/run/${name}.pid extra_commands=reload sig_reload=USR1 procname=%%PREFIX%%/sbin/${name} command=/usr/sbin/daemon command_args="%%DAEMONARGS%% -p ${pidfile} ${procname} \ -hooks ${webhook_conf} ${webhook_options}" start_precmd="install -o ${webhook_user} /dev/null ${pidfile}" -reload_cmd="pkill -SIGUSR1-U ${webhook_user} -F {pidfile} ${procname}" +reload_cmd="pkill -SIGUSR1 -U ${webhook_user} -F ${pidfile} -f ${procname}" run_rc_command "$1"