4 . /usr/lib/alternc/functions.sh
6 echo "This script will rebuild all web configuration and regenerate DNS."
7 echo "Use --force to skip confirmation"
9 if [ ! "$1" == "--force" ] ; then
10 read -n1 -p "Continue (y/n)? "
11 [[ $REPLY = [yY] ]] || exit 1
14 echo "++ Start rebuilding ++"
16 echo "Set flag to rebuild"
17 mysql_query "update sub_domaines set web_action = 'UPDATE' WHERE web_action != 'DELETE';"
18 mysql_query "update domaines set dns_action = 'UPDATE' WHERE dns_action != 'DELETE';"
20 echo "Now launching update_domains to rebuild."
21 /usr/lib/alternc/update_domains.sh