From 9abd3baf2ebe5460fb869e2deb292a23b3eea429 Mon Sep 17 00:00:00 2001 From: Hacktivista Date: Wed, 7 Nov 2018 15:31:01 -0300 Subject: [PATCH] Fix v-update-sys-ip: verify if primary IP exists Fixes the following errors on new installations: > mv: cannot move '/usr/local/vesta/data/ips/' to a subdirectory of itself, '/usr/local/vesta/data/ips/x.x.x.x' > sed: can't read /usr/local/vesta/data/users/*/dns/*.conf: No such file or directory > sed: -e expression #1, char 0: no previous regular expression > sed: -e expression #1, char 0: no previous regular expression --- bin/v-update-sys-ip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-update-sys-ip b/bin/v-update-sys-ip index 7360b07f..6c07edc6 100755 --- a/bin/v-update-sys-ip +++ b/bin/v-update-sys-ip @@ -44,7 +44,7 @@ if [[ "$ip_num" -eq '1' ]] && [[ "$v_ip_num" -eq 1 ]]; then fi # Updating configs -if [ ! -z "$new" ]; then +if [ ! -z "$old" ]; then mv $VESTA/data/ips/$old $VESTA/data/ips/$new # Updating PROXY