Update init.sh.jinja2

This commit is contained in:
qiaofeng1227 2022-07-12 14:25:00 +08:00 committed by GitHub
parent e307b57569
commit 16cd533b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ else
sudo sed -i "s/APP_PASSWORD=.*/APP_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env sudo sed -i "s/APP_PASSWORD=.*/APP_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
else else
sudo sed -i "s/APP_PASSWORD=.*/APP_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env sudo sed -i "s/APP_PASSWORD=.*/APP_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
cat .env |grep "APP_ENCRYPT=" |awk -F"APP_ENCRYPT=" '{ print $2 }' >>/tmp/encrypt.sh cat .env |grep "APP_ENCRYPT=" |awk -F"APP_ENCRYPT=" '{ print $2 }'|awk -F'"' '{ print $2 }' > /tmp/encrypt.sh
app_encrypt_password=$(bash /tmp/encrypt.sh) app_encrypt_password=$(bash /tmp/encrypt.sh)
sudo sed -i "s/APP_ENCRYPT_PASSWORD=.*/APP_ENCRYPT_PASSWORD=$app_encrypt_password/g" /data/apps/{{app_name}}/.env sudo sed -i "s/APP_ENCRYPT_PASSWORD=.*/APP_ENCRYPT_PASSWORD=$app_encrypt_password/g" /data/apps/{{app_name}}/.env
fi fi