File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,8 @@ check_hestia_demo_mode
5858# Get original port
5959ORIGINAL_PORT=$( cat $HESTIA /nginx/conf/nginx.conf | grep " listen" | sed ' s/[^0-9]*//g' )
6060
61- # Check if system variable is set
62- if [ ! -n " $BACKEND_PORT " ]; then
63- echo " BACKEND_PORT='$port '" >> $HESTIA /conf/hestia.conf
64- source $HESTIA /conf/hestia.conf
65- fi
66-
67- # Check if port is different to hestia.conf
68- if [ ! " $BACKEND_PORT " = " $PORT " ]; then
69- sed -i s/BACKEND_PORT=\' $BACKEND_PORT \' /BACKEND_PORT=\' $PORT \' /g $HESTIA /conf/hestia.conf
70- fi
61+ # Set new port in config via v-change-sys-config-value
62+ $HESTIA /bin/v-change-sys-config-value " BACKEND_PORT" $PORT
7163
7264# Check if port is different to nginx.conf
7365if [ " $ORIGINAL_PORT " = " $PORT " ]; then
Original file line number Diff line number Diff line change @@ -236,8 +236,9 @@ function syshealth_repair_system_config() {
236236
237237 # Backend port
238238 if [ -z " $BACKEND_PORT " ]; then
239- echo " [ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('8083')"
240- $BIN /v-change-sys-port ' 8083' > /dev/null 2>&1
239+ ORIGINAL_PORT=$( cat $HESTIA /nginx/conf/nginx.conf | grep " listen" | sed ' s/[^0-9]*//g' )
240+ echo " [ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('$ORIGINAL_PORT ')"
241+ $HESTIA /bin/v-change-sys-config-value ' BACKEND_PORT' $PORT
241242 fi
242243
243244 # Upgrade: Send email notification
You can’t perform that action at this time.
0 commit comments