mirror of https://github.com/tteck/Proxmox.git
parent
91985329f6
commit
9483d83c5e
|
@ -39,11 +39,11 @@ DB_NAME=umamidb
|
||||||
DB_USER=umami
|
DB_USER=umami
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||||
sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||||
sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||||
sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
echo "" >umami.creds
|
echo "" >umami.creds
|
||||||
echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>umami.creds
|
echo -e "umami Database User: \e[32m$DB_USER\e[0m" >>umami.creds
|
||||||
echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>umami.creds
|
echo -e "umami Database Password: \e[32m$DB_PASS\e[0m" >>umami.creds
|
||||||
|
@ -82,4 +82,4 @@ customize
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|
Loading…
Reference in New Issue