1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-02-01 17:31:49 +00:00

Update Password Creation to only create Chars (#750)

This commit is contained in:
Michel Roegl-Brunner 2024-12-09 21:22:37 +01:00 committed by GitHub
parent e4354c1d53
commit 4f66476de5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ msg_ok "Installed Node.js"
msg_info "Setting up postgresql"
DB_NAME=umamidb
DB_USER=umami
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"