diff --git a/index.html b/index.html index 37ee157..9c0f196 100644 --- a/index.html +++ b/index.html @@ -145,7 +145,7 @@ -
".$output.""; + +$output = shell_exec("sh install.sh"); echo $output; ?> diff --git a/install.sh b/install.sh index 040849d..9808e0b 100755 --- a/install.sh +++ b/install.sh @@ -647,15 +647,17 @@ else ACTION="install"; fi; -if [ "$USER" != "root" ] ; then - echo "You are not logged in as root." - echo "Do you want to continue and run $ACTION script as "$USER" user using sudo? (Y/n)"; - read -r ANSWER; - if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then - echo "Bye." - exit; - else - SUDO_CMD="sudo "; +if [ "$WEBINSTALL" == "" ]; then + if [ "$USER" != "root" ] ; then + echo "You are not logged in as root." + echo "Do you want to continue and run $ACTION script as "$USER" user using sudo? (Y/n)"; + read -r ANSWER; + if [ "$ANSWER" == "n" ] || [ "$ANSWER" == "N" ]; then + echo "Bye." + exit; + else + SUDO_CMD="sudo "; + fi; fi; fi;