Merge changesets 2959, 2960, 2961, 2962.
This commit is contained in:
parent
0825c2665e
commit
a6b04ed714
|
@ -72,7 +72,7 @@ if (!$_SERVER[HTTPS]) {
|
||||||
</td><td>
|
</td><td>
|
||||||
<form action="login.php" method="post" target="_top">
|
<form action="login.php" method="post" target="_top">
|
||||||
<table border="0" style="border: 1px solid #202020;" cellspacing="0" cellpadding="3" width="300px" >
|
<table border="0" style="border: 1px solid #202020;" cellspacing="0" cellpadding="3" width="300px" >
|
||||||
<tr><th colspan="2" align="center">Accès AlternC</th></tr>
|
<tr><th colspan="2" align="center"><?php __("AlternC access"); ?></th></tr>
|
||||||
<tr><th align="right"><label for="username"><?php echo _("Username"); ?></label></th><td><input type="text" class="int" name="username" id="username" value="" maxlength="128" size="15" /></td></tr>
|
<tr><th align="right"><label for="username"><?php echo _("Username"); ?></label></th><td><input type="text" class="int" name="username" id="username" value="" maxlength="128" size="15" /></td></tr>
|
||||||
<tr><th align="right"><label for="password"><?php echo _("Password"); ?></label></th><td><input type="password" class="int" name="password" id="password" value="" maxlength="128" size="15" /></td></tr>
|
<tr><th align="right"><label for="password"><?php echo _("Password"); ?></label></th><td><input type="password" class="int" name="password" id="password" value="" maxlength="128" size="15" /></td></tr>
|
||||||
<tr><td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Enter"); ?>" /><input type="hidden" id="restrictip" name="restrictip" value="1" /></td></tr>
|
<tr><td colspan="2" align="center"><input type="submit" class="inb" name="submit" value="<?php __("Enter"); ?>" /><input type="hidden" id="restrictip" name="restrictip" value="1" /></td></tr>
|
||||||
|
|
|
@ -70,7 +70,7 @@ if (isset($http_auth) && $http_auth) {
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
|
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
|
||||||
// Gruiiik
|
// Gruiiik
|
||||||
$_REQUEST["username"]=$_SERVER['PHP_AUTH_USER'];
|
$_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/";
|
$help_baseurl="http://www.aide-alternc.org/";
|
||||||
|
|
||||||
/* PHPLIB inclusions : */
|
|
||||||
$root="/var/alternc/bureau/";
|
|
||||||
/* Server Domain Name */
|
/* Server Domain Name */
|
||||||
$host=getenv("HTTP_HOST");
|
$host=getenv("HTTP_HOST");
|
||||||
|
|
||||||
/* Global variables (AlternC configuration) */
|
/* 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/db_mysql.php");
|
||||||
require_once($root."class/functions.php");
|
require_once($root."class/functions.php");
|
||||||
|
|
|
@ -39,6 +39,7 @@ umask 022
|
||||||
#
|
#
|
||||||
|
|
||||||
DOMAIN_LOG_FILE="/var/log/alternc/update_domains.log"
|
DOMAIN_LOG_FILE="/var/log/alternc/update_domains.log"
|
||||||
|
exec >>"$DOMAIN_LOG_FILE" 2>&1
|
||||||
|
|
||||||
if [ `whoami` = 'root' ]; then
|
if [ `whoami` = 'root' ]; then
|
||||||
sudo=""
|
sudo=""
|
||||||
|
@ -48,7 +49,7 @@ fi
|
||||||
|
|
||||||
apache_reload() {
|
apache_reload() {
|
||||||
if [ -x /usr/sbin/apache2ctl ]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,14 +59,14 @@ if [ ! -z "$RELOAD_ZONES" ]; then
|
||||||
for zone in $RELOAD_ZONES; do
|
for zone in $RELOAD_ZONES; do
|
||||||
case $zone in
|
case $zone in
|
||||||
"all")
|
"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_reload # keep for compatibility
|
||||||
;;
|
;;
|
||||||
"apache")
|
"apache")
|
||||||
apache_reload
|
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
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue