diff --git a/install.sh b/install.sh index 4e13fea..479e075 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,14 @@ #!/bin/bash -apt-get update -apt-get install -y --assume-yes python-pip wget dialog vim -pip install python2-pythondialog -wget -qO- "https://srchub.org/p/srchub-install/source/file/master/srchub-install.py" | python \ No newline at end of file +rootcheck=`whoami` + +if [ "$rootcheck" == "root" ] +then + apt-get update + apt-get install -y --assume-yes python-pip wget dialog vim + pip install python2-pythondialog + wget -qO- "https://srchub.org/p/srchub-install/source/file/master/srchub-install.py" | python + cd /home/www/indefero/src +else + echo "You must be root to use this script" +fi diff --git a/srchub-install.py b/srchub-install.py index 814d58e..3026a54 100644 --- a/srchub-install.py +++ b/srchub-install.py @@ -218,7 +218,6 @@ def prep_apache(): content_file.write(INDEFERO_SVN_APACHE) def final_msg(): - os.chdir("/home/www/indefero/src") call("mv /home/www/indefero/src/IDF/conf/path.php-dist /home/www/indefero/src/IDF/conf/path.php".split(" ")) call("mv /home/www/indefero/src/IDF/conf/idf.php-dist /home/www/indefero/src/IDF/conf/idf.php".split(" ")) d.msgbox(FINAL_MSG)