From f8014c4677fd946e296c19a6318220f2629dbf0f Mon Sep 17 00:00:00 2001 From: "Wahlstedt, Walter" Date: Mon, 23 Nov 2015 16:37:54 -0500 Subject: [PATCH] Insure running as root. added comment added comment to ubuntu installer so people know to wait. --- install.sh | 4 ++++ snipeit.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c263576660..fba2a1c0ed 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,7 @@ +# ensure running as root +if [ "$(id -u)" != "0" ]; then + exec sudo "$0" "$@" +fi wget https://raw.githubusercontent.com/merid14/snipe-it/develop/snipeit.sh chmod 744 snipeit.sh sudo ./snipeit.sh 2>&1 | sudo tee -a /var/log/snipeit-install.log \ No newline at end of file diff --git a/snipeit.sh b/snipeit.sh index d78ded6739..a5a90866d3 100644 --- a/snipeit.sh +++ b/snipeit.sh @@ -141,7 +141,7 @@ case $distro in #Update/upgrade Debian/Ubuntu repositories, get the latest version of git. echo "" - echo "## Updating ubuntu" + echo "## Updating ubuntu in the background. Please be patient." echo "" apachefile=/etc/apache2/sites-available/$name.conf sudo apt-get update >> /var/log/snipeit-install.log 2>&1