mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-26 17:40:33 +00:00
Update init.sh.jinja2
This commit is contained in:
parent
64b83de68b
commit
3f8eda4a7e
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ app_url_replace=$(cat /data/apps/{{app_name}}/.env |grep APP_URL_REPLACE)
|
|||
if [ $app_url_replace = "APP_URL_REPLACE=true" ]; then
|
||||
echo "Change APP_URL" 1>> /tmp/init_debug.txt
|
||||
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
|
||||
urlstr=`grep "APP_URL=" /data/apps/{{app_name}}/.env |cut -d":" -f1`
|
||||
sudo sed -i "s/$urlstr/APP_URL=$public_ip/g" /data/apps/{{app_name}}/.env
|
||||
else
|
||||
echo "There is not APP_URL"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue