From 52c4c8bc51da53a06cc45291c9afbe36d5d89765 Mon Sep 17 00:00:00 2001 From: Jamieson Becker Date: Fri, 7 Dec 2018 10:27:07 -0600 Subject: [PATCH] Requested changes per https://github.com/zulip/zulip/pull/10847#pullrequestreview-182119529 --- scripts/setup/delete-reinitialize-database | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/setup/delete-reinitialize-database b/scripts/setup/delete-reinitialize-database index 897ec25e6f..22013798a0 100644 --- a/scripts/setup/delete-reinitialize-database +++ b/scripts/setup/delete-reinitialize-database @@ -3,6 +3,11 @@ set -e set -x +if [ "$(id -u)" -ne "0" ]; then + >&2 echo "$0 must be run as root." + exit 1 +fi + cat <&2 echo "Exiting because root is not available." - exit 1 -fi - /home/zulip/deployments/current/scripts/setup/postgres-init-db /home/zulip/deployments/current/scripts/setup/initialize-database