mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-26 12:33:09 +08:00
12 lines
399 B
Django/Jinja
12 lines
399 B
Django/Jinja
#!/bin/bash
|
|
# support special char [!"`$%()[]{},.*+-:;<=>?_~/|]
|
|
new_password=$(pwgen -ncCs 14 1)!
|
|
sudo sleep 10s
|
|
sudo sh -c 'echo "init-password started at" $(date -d now) 1>> /tmp/init_debug.txt'
|
|
|
|
#1 init for applist of .env
|
|
{% for app_name in applist.stdout_lines %}
|
|
sudo sed -i "s/_PASSWORD=.*/_PASSWORD=$new_password/g" /data/apps/{{app_name}}/.env
|
|
{% endfor %}
|
|
|
|
2 init for applist of special |