Update change_ip.sh

This commit is contained in:
qiaofeng1227 2022-07-19 16:40:30 +08:00 committed by GitHub
parent 6b2a1f59ab
commit 52eacfabcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@ app_url_replace=$(cat /data/apps/$1/.env |grep APP_URL_REPLACE)
if [ $app_url_replace == "APP_URL_REPLACE=true" ]; then if [ $app_url_replace == "APP_URL_REPLACE=true" ]; then
echo "Change APP_URL" echo "Change APP_URL"
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash` public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
sudo sed -i "s/APP_URL=.*/APP_URL=$public_ip/g" /data/apps/{{app_name}}/.env sudo sed -i "s/APP_URL=.*/APP_URL=$public_ip/g" /data/apps/$1/.env
else else
echo "There is not APP_URL" echo "There is not APP_URL"
fi fi