mirror of https://github.com/zulip/zulip.git
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:
parent
c89d675462
commit
9d9bfb27ef
|
@ -30,7 +30,7 @@ else
|
|||
fi
|
||||
|
||||
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);
|
||||
EOF
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue