#!/bin/sh
##
##  certbot(8) renewal post hook
##

#   standard case: reload Apache, if present
if [ -x @l_prefix@/sbin/apache ]; then
    @l_prefix@/bin/sudo @l_prefix@/bin/openpkg rc apache reload
fi

#   standard case: reload NGINX, if present
if [ -x @l_prefix@/sbin/nginx ]; then
    @l_prefix@/bin/sudo @l_prefix@/bin/openpkg rc nginx reload
fi

#   standard case: reload Dovecot, if present
if [ -x @l_prefix@/sbin/dovecot ]; then
    @l_prefix@/bin/sudo @l_prefix@/bin/openpkg rc dovecot reload
fi

#   standard case: reload Postfix, if present
if [ -x @l_prefix@/sbin/postfix ]; then
    @l_prefix@/bin/sudo @l_prefix@/bin/openpkg rc postfix reload
fi

#   standard case: reload HAProxy, if present
if [ -x @l_prefix@/sbin/haproxy ]; then
    @l_prefix@/bin/sudo @l_prefix@/bin/openpkg rc haproxy reload
fi

