Create changeIP.sh
This commit is contained in:
parent
a89b5afcbf
commit
0a6ee50165
1 changed files with 9 additions and 0 deletions
9
scripts/changeIP.sh
Normal file
9
scripts/changeIP.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
# init APP_URL
|
||||
app_url_replace=$(cat /data/apps/$1/.env |grep APP_URL_REPLACE)
|
||||
if [ $app_url_replace == "APP_URL_REPLACE=true" ]; then
|
||||
echo "Change APP_URL"
|
||||
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
|
||||
else
|
||||
echo "There is not APP_URL"
|
||||
fi
|
Loading…
Add table
Reference in a new issue