#!/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
