Update init.sh.jinja2

This commit is contained in:
qiaofeng1227 2022-07-12 17:08:44 +08:00 committed by GitHub
parent 15ea58819d
commit 62d54fd39f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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