Patch de "comment"

A merger avec 1.0 (xals ?)
This commit is contained in:
Alan Garcia 2011-06-03 10:10:40 +00:00
parent f5458b3da3
commit 025b6db399
1 changed files with 4 additions and 3 deletions

View File

@ -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