This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="div_additionals">
|
||||
<div id="div_additionals" class="hidden">
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
<label for="service_dir">Please add directory path of service files: (/etc/user/config/services/)</label>
|
||||
|
@@ -2,6 +2,10 @@
|
||||
|
||||
putenv('WEBINSTALL=true');
|
||||
|
||||
// TEMP
|
||||
putenv('HOME=/home/hael');
|
||||
putenv('USER=hael');
|
||||
|
||||
putenv('DOCKER_REGISTRY_URL='.$_POST["registry"]);
|
||||
|
||||
if ($_POST["smarthost"]=="Y") {
|
||||
@@ -44,6 +48,9 @@ putenv('ADDITIONAL='.$_POST["additional"]);
|
||||
|
||||
// check ENV variables
|
||||
$output = shell_exec("set");
|
||||
echo "<pre>".$output."</pre>";
|
||||
|
||||
$output = shell_exec("sh install.sh");
|
||||
echo $output;
|
||||
|
||||
?>
|
||||
|
20
install.sh
20
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;
|
||||
|
||||
|
Reference in New Issue
Block a user