scripts/bootstrap
Michal Čihař 94bd39ec11 Set postgresql password
Signed-off-by: Michal Čihař <michal@cihar.com>
2019-09-22 20:40:56 +02:00

32 lines
563 B
Bash
Executable file

#!/bin/sh
echo "Weblate domain:"
read domain
echo "Weblate title:"
read title
echo "Sentry DNS:"
read sentry
echo "Matomo site id:"
read matomo
echo "Munin allow:"
read munin
smtp_pass=$(openssl rand -hex 32)
cat > /etc/weblate-bootstrap <<EOT
WEBLATE_DOMAIN="$domain"
WEBLATE_TITLE="$title"
WEBLATE_SECRET=$(openssl rand -hex 32)
WEBLATE_PIWIK="$matomo"
WEBLATE_SENTRY="$sentry"
# Exim
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