Alternc  latest
Alternc logiel libre pour l'hébergement
rebuild_all_webconf.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 # Get some vars
4 . /usr/lib/alternc/functions.sh
5 
6 echo "This script will rebuild all web configuration and regenerate DNS."
7 echo "Use --force to skip confirmation"
8 
9 if [ ! "$1" == "--force" ] ; then
10  read -n1 -p "Continue (y/n)? "
11  [[ $REPLY = [yY] ]] || exit 1
12 fi
13 
14 echo "++ Start rebuilding ++"
15 
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';"
19 
20 echo "Now launching update_domains to rebuild."
21 /usr/lib/alternc/update_domains.sh
22 
23 echo "Finish."
24