#!/bin/bash # Reloading services to refresh certificates me=$(basename "$0") logger -t "$me" "Reloading postfix to refresh certificates." postfix reload (( $? != 0 )) && logger -t "$me" "ERROR with postfix reload." logger -t "$me" "Reloading dovecot to refresh certificates." doveadm reload (( $? != 0 )) && logger -t "$me" "ERROR with doveadm reload." logger -t "$me" "Reloading Apache to refresh certificates." apachectl -t >/dev/null && apachectl graceful (( $? != 0 )) && logger -t "$me" "ERROR with apachectl." exit 0