Skip to content

Commit 571a6b0

Browse files
authored
Merge pull request hestiacp#1949 from clarkchentw/patch-1
Fix v-change-sys-ip-nat for no dns config
2 parents 5e1e7c5 + 4dc750a commit 571a6b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/v-change-sys-ip-nat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ fi
7070
if [ ! -z "$old" ] && [ ! -z "$DNS_SYSTEM" ]; then
7171
for user in $($HESTIA/bin/v-list-sys-users plain); do
7272
sed -i "s/$old/$new/" $HESTIA/data/users/$user/dns.conf
73-
sed -i "s/$old/$new/" $HESTIA/data/users/$user/dns/*.conf
73+
if ls $HESTIA/data/users/$user/dns/*.conf 1> /dev/null 2>&1; then
74+
sed -i "s/$old/$new/" $HESTIA/data/users/$user/dns/*.conf
75+
fi
7476
$BIN/v-rebuild-dns-domains $user no
7577
done
7678
$BIN/v-restart-dns $restart

0 commit comments

Comments
 (0)