Skip to content

Commit 78ef550

Browse files
author
Alexandros Ioannides
authored
Update 1.4.0.sh
1 parent a06ef0c commit 78ef550

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

install/upgrade/versions/1.4.0.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,19 @@ if [ -f /etc/apt/sources.list.d/postgresql.list ]; then
107107
fi
108108

109109
# New configuration value for enforcing subdomain ownership
110-
echo "ENFORCE_SUBDOMAIN_OWNERSHIP='no'" >> $HESTIA/conf/hestia.conf
110+
check=$(cat $HESTIA/conf/hestia.conf | grep 'ENFORCE_SUBDOMAIN_OWNERSHIP');
111+
if [ -z "$check" ]; then
112+
echo "[ * ] Setting ENFORCE_SUBDOMAIN_OWNERSHIP to no"
113+
echo "ENFORCE_SUBDOMAIN_OWNERSHIP='no'" >> $HESTIA/conf/hestia.conf
114+
fi
111115

112116
# New API feature to set allowed IPs
113117
if [ "$api" = "yes" ]; then
114-
echo "API_ALLOWED_IP='allow-all'" >> $HESTIA/conf/hestia.conf
118+
check=$(cat $HESTIA/conf/hestia.conf | grep 'API_ALLOWED_IP');
119+
if [ -z "$check" ]; then
120+
echo "[ * ] Setting API_ALLOWED_IP to allow-all"
121+
echo "API_ALLOWED_IP='allow-all'" >> $HESTIA/conf/hestia.conf
122+
fi
115123
else
116124
$HESTIA/bin/v-change-sys-api disable
117125
fi

0 commit comments

Comments
 (0)