#!/usr/bin/env bash [ -d /run/systemd/system/ ] && systemctl daemon-reload [ -d /run/systemd/system/ ] && systemctl enable webhookd [ "$1" == "upgrade" ] && [ -d /run/systemd/system/ ] && systemctl restart webhookd [ "$1" == "configure" ] && [ ! -f /etc/webhookd.env ] && echo 'WHD_SCRIPTS="/opt/scripts"' > /etc/webhookd.env exit 0