Permet de forcer un regenerate des zones
Refait marcher le rebuild-all-webconf
This commit is contained in:
parent
3eecc68a81
commit
35f146eb39
|
@ -5,7 +5,7 @@
|
||||||
*
|
*
|
||||||
* Generate Bind configuration for AlternC
|
* Generate Bind configuration for AlternC
|
||||||
*
|
*
|
||||||
* To force generation, /launch/generate_bind_conf.php force
|
* To force generation, /launch/generate_bind_conf.php --force
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
@ -15,6 +15,10 @@ ini_set("display_errors", 1);
|
||||||
|
|
||||||
$bind = new system_bind();
|
$bind = new system_bind();
|
||||||
|
|
||||||
//$bind->regenerate_conf(true); // use it to force regeneration
|
$force = false;
|
||||||
$bind->regenerate_conf();
|
if (in_array('--force', $argv)) { // Want to force
|
||||||
|
$force=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$bind->regenerate_conf($force);
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Get some vars
|
# Get some vars
|
||||||
. /usr/lib/alternc/functions_hosting.sh
|
. /usr/lib/alternc/functions.sh
|
||||||
|
|
||||||
if [ -z "$VHOST_DIR" ] ; then
|
echo "This script will rebuild all web configuration and regenerate DNS."
|
||||||
echo "Problem: No VHOST_DIR var"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "This script empty the $VHOST_DIR directory"
|
|
||||||
echo "and rebuild all web configuration."
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Only files in $VHOST_MANUALCONF will be preserved."
|
echo "Only files in $VHOST_MANUALCONF will be preserved."
|
||||||
echo "Use --force to skip confirmation"
|
echo "Use --force to skip confirmation"
|
||||||
|
@ -23,20 +17,13 @@ fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "++ Start rebuilding ++"
|
echo "++ Start rebuilding ++"
|
||||||
|
|
||||||
echo "Delete old configuration"
|
|
||||||
# [a-z_] for old storage schema (1.0)
|
|
||||||
for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z _ ; do
|
|
||||||
test -d "$VHOST_DIR/$i" && rm -rf "$VHOST_DIR/$i/"
|
|
||||||
done
|
|
||||||
test -f "$VHOST_FILE" && rm -f "$VHOST_FILE"
|
|
||||||
echo "Deleting complete"
|
|
||||||
|
|
||||||
echo "Set flag to rebuild"
|
echo "Set flag to rebuild"
|
||||||
mysql_query "update sub_domaines set web_action = 'UPDATE';"
|
mysql_query "update sub_domaines set web_action = 'UPDATE' and web_action != 'DELETE';"
|
||||||
mysql_query "update domaines set dns_action = 'UPDATE';"
|
mysql_query "update domaines set dns_action = 'UPDATE' and dns_action != 'DELETE';"
|
||||||
|
|
||||||
echo "Launch update_domains to rebuild."
|
echo "Launch update_domains to rebuild."
|
||||||
/usr/lib/alternc/update_domains.sh
|
/usr/lib/alternc/update_domains.sh
|
||||||
|
/usr/lib/alternc/generate_bind_conf.php --force
|
||||||
|
|
||||||
echo "Finish."
|
echo "Finish."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue