From 465aaf2d3052d6494915406fc7312b4e74352a9c Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Wed, 16 Jul 2014 08:29:50 -0400 Subject: [PATCH] check that we're running as root before doing anything --- setup/start.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup/start.sh b/setup/start.sh index 51153b42..0b8de9a5 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -6,6 +6,15 @@ source setup/functions.sh # load our functions # Check system setup. +# Are we running as root? +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root. Please re-run like this:" + echo + echo "sudo setup/start.sh" + echo + exit +fi + # Check that we are running on Ubuntu 14.04 LTS. if [ "`lsb_release -d | sed 's/.*:\s*//'`" != "Ubuntu 14.04 LTS" ]; then echo "Mail-in-a-Box only supports being installed on Ubuntu 14.04, sorry. You are running:"