From 0e8b482ae2e47782eb5c807eca8d7a5d9327a86c Mon Sep 17 00:00:00 2001 From: cmstew Date: Wed, 26 Jul 2017 08:24:45 -0600 Subject: [PATCH 1/3] Minor bug fix of v-sync-dns-cluster Problem Outlined: It seems that another script has dropped a file called history.log into the $VESTA/data/users folder causing v-sync-dns-cluster to throw a soft error about not finding /usr/local/vesta/data/users/history.log/dns.conf when syncing zones. Fix: Tell the script to ignore that log file when syncing user domains and the output becomes clean. --- bin/v-sync-dns-cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-sync-dns-cluster b/bin/v-sync-dns-cluster index 45be34825..308d33295 100755 --- a/bin/v-sync-dns-cluster +++ b/bin/v-sync-dns-cluster @@ -49,7 +49,7 @@ for cluster in $hosts; do check_result $? "$HOST connection failed" $E_CONNECT # Syncing user domains - user_list=$(ls $VESTA/data/users |grep -v "dns-cluster") + user_list=$(ls $VESTA/data/users |grep -v "dns-cluster" |grep -v "history.log") for user in $user_list; do for str in $(cat $VESTA/data/users/$user/dns.conf); do From a2e57fd1997b01a31901f78a072cbee32a89e0b1 Mon Sep 17 00:00:00 2001 From: cmstew Date: Thu, 10 Aug 2017 11:43:04 -0600 Subject: [PATCH 2/3] Update v-sync-dns-cluster Improved the script that gets the list of users. It now ignores any files that are in the $VESTA/data/users directory and only acknowledges folders. --- bin/v-sync-dns-cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-sync-dns-cluster b/bin/v-sync-dns-cluster index 308d33295..e10e5228d 100755 --- a/bin/v-sync-dns-cluster +++ b/bin/v-sync-dns-cluster @@ -49,7 +49,7 @@ for cluster in $hosts; do check_result $? "$HOST connection failed" $E_CONNECT # Syncing user domains - user_list=$(ls $VESTA/data/users |grep -v "dns-cluster" |grep -v "history.log") + user_list=$(ls -d $VESTA/data/users/*/ | sed "s#$VESTA/data/users/##" | sed s"/.$//") for user in $user_list; do for str in $(cat $VESTA/data/users/$user/dns.conf); do From 3fe9997ab34df887a21ddf1c2035c7e2e9ab297d Mon Sep 17 00:00:00 2001 From: cmstew Date: Thu, 10 Aug 2017 11:44:38 -0600 Subject: [PATCH 3/3] Update v-sync-dns-cluster Forgot to exclude the dns-cluster user in the updated script. --- bin/v-sync-dns-cluster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-sync-dns-cluster b/bin/v-sync-dns-cluster index e10e5228d..207ecf91a 100755 --- a/bin/v-sync-dns-cluster +++ b/bin/v-sync-dns-cluster @@ -49,7 +49,7 @@ for cluster in $hosts; do check_result $? "$HOST connection failed" $E_CONNECT # Syncing user domains - user_list=$(ls -d $VESTA/data/users/*/ | sed "s#$VESTA/data/users/##" | sed s"/.$//") + user_list=$(ls -d $VESTA/data/users/*/ | sed "s#$VESTA/data/users/##" | sed s"/.$//" | grep -v "dns-cluster") for user in $user_list; do for str in $(cat $VESTA/data/users/$user/dns.conf); do