mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +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
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user