From 25671158a458fcd6ee1527870b4b61a968b0208e Mon Sep 17 00:00:00 2001 From: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Date: Sat, 29 Jul 2023 21:59:31 +0800 Subject: [PATCH] fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file --- scripts/install_im_server.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install_im_server.sh b/scripts/install_im_server.sh index efe29cfcb..98282e465 100755 --- a/scripts/install_im_server.sh +++ b/scripts/install_im_server.sh @@ -37,6 +37,9 @@ function onCtrlC () { exit 1 } +# Load environment variables from .env file +source ${OPENIM_ROOT}/.env + # Replace local IP address with the public IP address in .env file if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env @@ -50,8 +53,6 @@ fi internet_ip=$(curl ifconfig.me -s) echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n" -# Load environment variables from .env file -source ${OPENIM_ROOT}/.env echo -e "${PURPLE_PREFIX}=========> Your minio endpoint is ${MINIO_ENDPOINT} ${COLOR_SUFFIX} \n"