mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Auto-generate dev-secrets file.
Source LOCAL_DATABASE_PASSWORD and INITIAL_PASSWORD_SALT from the secrets file. Fix the creation of pgpass file. Tim's note: This will definitely break the original purpose of the tool but it should be pretty easy to add that back as an option. (imported from commit 8ab31ea2b7cbc80a4ad2e843a2529313fad8f5cf)
This commit is contained in:
@@ -48,9 +48,12 @@ ALTER ROLE $VAGRANTUSERNAME SET search_path TO $SEARCH_PATH;
|
||||
EOF
|
||||
|
||||
umask go-rw
|
||||
PGPASS_LINE="*:*:*:$USERNAME:$PASSWORD"
|
||||
if ! $(grep -q "$PGPASS_LINE" ~/.pgpass); then
|
||||
echo $PGPASS_LINE >> ~/.pgpass
|
||||
PGPASS_PREFIX="*:*:*:$USERNAME:"
|
||||
PGPASS_ESCAPED_PREFIX="*:\*:\*:$USERNAME:"
|
||||
if ! $(grep -q "$PGPASS_ESCAPED_PREFIX" ~/.pgpass); then
|
||||
echo $PGPASS_PREFIX$PASSWORD >> ~/.pgpass
|
||||
else
|
||||
sed -i 's/$PGPASS_ESCAPED_PREFIX.*$/$PGPASS_PREFIX$PASSWORD/' ~/.pgpass
|
||||
fi
|
||||
chmod go-rw ~/.pgpass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user