From a6b04ed7147eff3300fa25b59245ca362ae5147e Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 3 Jun 2011 12:43:09 +0000 Subject: [PATCH] Merge changesets 2959, 2960, 2961, 2962. --- bureau/admin/index.php | 2 +- bureau/class/config.php | 8 ++++---- src/alternc_reload | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bureau/admin/index.php b/bureau/admin/index.php index 1912a202..8e4e22ce 100644 --- a/bureau/admin/index.php +++ b/bureau/admin/index.php @@ -72,7 +72,7 @@ if (!$_SERVER[HTTPS]) {
- + diff --git a/bureau/class/config.php b/bureau/class/config.php index 98c7a7a7..1abf758d 100644 --- a/bureau/class/config.php +++ b/bureau/class/config.php @@ -70,7 +70,7 @@ if (isset($http_auth) && $http_auth) { header('HTTP/1.0 401 Unauthorized'); exit(); } - } +} if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { // Gruiiik $_REQUEST["username"]=$_SERVER['PHP_AUTH_USER']; @@ -80,13 +80,13 @@ if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) { $help_baseurl="http://www.aide-alternc.org/"; -/* PHPLIB inclusions : */ -$root="/var/alternc/bureau/"; /* Server Domain Name */ $host=getenv("HTTP_HOST"); /* Global variables (AlternC configuration) */ -require_once($root."class/local.php"); +require_once(dirname(__FILE__)."/local.php"); +/* PHPLIB inclusions : */ +$root=$L_ALTERNC_LOC."/bureau/"; require_once($root."class/db_mysql.php"); require_once($root."class/functions.php"); 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
Accès AlternC
" />