mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
Correct shell quoting around $DEFAULT_USER in terminate-psql-sessions
Previously, we used shell quoting that would result in the shell variable not being substituted. Instead, we use `"`s that will allow for variable substitution.
This commit is contained in:
@@ -30,7 +30,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$EUID" -eq 0 ]; then
|
if [ "$EUID" -eq 0 ]; then
|
||||||
sudo -u "$DEFAULT_USER" sh -c 'psql postgres "$DEFAULT_USER"' <<EOF
|
sudo -u "$DEFAULT_USER" sh -c "psql postgres '$DEFAULT_USER'" <<EOF
|
||||||
SELECT pg_terminate_backend($pidname) FROM pg_stat_activity WHERE datname IN ($tables);
|
SELECT pg_terminate_backend($pidname) FROM pg_stat_activity WHERE datname IN ($tables);
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user