From 88b7db13b2adcd91e60fe72bbd9b1b9fd3048153 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Tue, 12 Jul 2022 10:39:09 +0800 Subject: [PATCH] Update init.sh.jinja2 --- apps/roles/role_init/templates/init.sh.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/roles/role_init/templates/init.sh.jinja2 b/apps/roles/role_init/templates/init.sh.jinja2 index 05c72885..76956d63 100644 --- a/apps/roles/role_init/templates/init.sh.jinja2 +++ b/apps/roles/role_init/templates/init.sh.jinja2 @@ -20,7 +20,8 @@ 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 - app_encrypt_password=$(has_app_encrypt) + cat .env |grep "APP_ENCRYPT=" |awk -F"APP_ENCRYPT=" '{ print $2 }' >>/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 fi