diff --git a/src/alternc_reload b/src/alternc_reload index ac7ae35f..c665b3ec 100755 --- a/src/alternc_reload +++ b/src/alternc_reload @@ -39,6 +39,7 @@ umask 022 # DOMAIN_LOG_FILE="/var/log/alternc/update_domains.log" +exec >>"$DOMAIN_LOG_FILE" 2>&1 if [ `whoami` = 'root' ]; then sudo="" @@ -48,7 +49,7 @@ fi apache_reload() { if [ -x /usr/sbin/apache2ctl ]; then - $sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE" + $sudo /usr/sbin/apache2ctl graceful || echo "Cannot restart apache" fi } @@ -58,14 +59,14 @@ if [ ! -z "$RELOAD_ZONES" ]; then for zone in $RELOAD_ZONES; do case $zone in "all") - $sudo rndc reload > /dev/null || echo "Cannot reload bind" >> "$DOMAIN_LOG_FILE" + $sudo rndc reload || echo "Cannot reload bind" apache_reload # keep for compatibility ;; "apache") apache_reload ;; *) - $sudo rndc reload "$zone" > /dev/null || echo "Cannot reload bind for zone $zone" >> "$DOMAIN_LOG_FILE" + $sudo rndc reload "$zone" || echo "Cannot reload bind for zone $zone" ;; esac done