mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 10:17:15 +08:00
Update init.sh.jinja2
This commit is contained in:
parent
9c9514e033
commit
8aec2c2e47
@ -12,7 +12,7 @@ sudo docker compose -f /data/apps/{{app_name}}/docker-compose.yml down -v
|
|||||||
# init password
|
# init password
|
||||||
sudo sed -i "s/POWER_PASSWORD=.*/POWER_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
|
sudo sed -i "s/POWER_PASSWORD=.*/POWER_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
|
||||||
# has_app_encrypt
|
# has_app_encrypt
|
||||||
has_app_encrypt=$(cat /data/apps/{{app_name}}/.env |grep "APP_ENCRYPT=")
|
has_app_encrypt=$(cat /data/apps/{{app_name}}/.env |grep "APP_ENCRYPT_PASSWORD=")
|
||||||
if [ $has_app_encrypt != "" ]; then
|
if [ $has_app_encrypt != "" ]; then
|
||||||
echo "Encrypt password" 1>> /tmp/init_debug.txt
|
echo "Encrypt password" 1>> /tmp/init_debug.txt
|
||||||
app_encrypt_password=$(bash /data/apps/{{app_name}}/src/encrypt.sh $new_password)
|
app_encrypt_password=$(bash /data/apps/{{app_name}}/src/encrypt.sh $new_password)
|
||||||
@ -41,16 +41,12 @@ sudo sed -i "s/POWER_PASSWORD=.*//g" /data/apps/{{app_name}}/.env
|
|||||||
sudo docker compose -f /data/apps/{{app_name}}/docker-compose.yml up -d
|
sudo docker compose -f /data/apps/{{app_name}}/docker-compose.yml up -d
|
||||||
|
|
||||||
#2 init for applist of special
|
#2 init for applist of special
|
||||||
after_path=/data/apps/{{app_name}}/src/after_up.sh
|
echo "Executing after_up.sh" 1>> /tmp/init_debug.txt
|
||||||
if [ -f "$after_path" ]; then
|
bash /data/apps/{{app_name}}/src/after_up.sh
|
||||||
echo "Executing after_up.sh" 1>> /tmp/init_debug.txt
|
|
||||||
bash /data/apps/{{app_name}}/src/after_up.sh
|
|
||||||
else
|
|
||||||
echo "There is not after_up"
|
|
||||||
fi
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
# create password file for guests
|
||||||
cat /data/apps/{{appname}}/.env |grep 'DB_\|APP_' > /credentials/password.txt
|
cat /data/apps/{{appname}}/.env |grep 'DB_\|APP_' > /credentials/password.txt
|
||||||
|
|
||||||
sudo sh -c 'echo "init docker ended at" $(date -d now) 1>> /tmp/init_debug.txt'
|
sudo sh -c 'echo "init docker ended at" $(date -d now) 1>> /tmp/init_debug.txt'
|
||||||
|
Loading…
Reference in New Issue
Block a user