1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-22 02:17:26 +00:00

check that we're running as root before doing anything

This commit is contained in:
Joshua Tauberer 2014-07-16 08:29:50 -04:00
parent 5a4f5b1874
commit 465aaf2d30

View File

@ -6,6 +6,15 @@ source setup/functions.sh # load our functions
# Check system setup. # 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. # Check that we are running on Ubuntu 14.04 LTS.
if [ "`lsb_release -d | sed 's/.*:\s*//'`" != "Ubuntu 14.04 LTS" ]; then 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:" echo "Mail-in-a-Box only supports being installed on Ubuntu 14.04, sorry. You are running:"