mirror of
https://gh.llkk.cc/https://github.com/WeblateOrg/scripts.git
synced 2025-10-03 15:01:00 +08:00
Set postgresql password
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
3a020c6e46
commit
94bd39ec11
3 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,9 @@ WEBLATE_SENTRY="$sentry"
|
|||
EXIM_PASS=$smtp_pass
|
||||
# $(openssl passwd -6 -salt $(openssl rand -hex 6) "$smtp_pass")
|
||||
|
||||
# Postgresql
|
||||
POSTGRES_PASS=$(openssl rand -hex 32)
|
||||
|
||||
# Munin
|
||||
MUNIN_ALLOW="$munin"
|
||||
EOT
|
||||
|
|
|
@ -13,3 +13,4 @@ pg_ctlcluster 11 main start
|
|||
# Create Weblate user and database
|
||||
sudo -u postgres createuser -D weblate
|
||||
sudo -u postgres createdb -O weblate weblate
|
||||
sudo -u postgres psql -c "alter user weblate with encrypted password '$POSTGRES_PASS';"
|
||||
|
|
|
@ -71,6 +71,7 @@ sed -i \
|
|||
-e "s#^SITE_TITLE.*#SITE_TITLE = '$WEBLATE_TITLE'#" \
|
||||
-e "s#^ALLOWED_HOSTS.*#ALLOWED_HOSTS = ['$WEBLATE_DOMAIN']#" \
|
||||
-e "s#^SENTRY_DSN.*#SENTRY_DSN = '$WEBLATE_SENTRY'#" \
|
||||
-e "s#'PASSWORD':.*#'PASSWORD': '$POSTGRES_PASS'#" \
|
||||
/home/weblate/weblate-env/lib/python3.7/site-packages/weblate/settings.py
|
||||
|
||||
sudo -u weblate /home/weblate/weblate-env/bin/weblate changesite --set-name $WEBLATE_DOMAIN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue