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