Просмотр исходного кода

Feature: (--with-debs) make hestia-nginx and hestia-php local packages optional, only hestia deb is required

Robert Zollner 6 лет назад
Родитель
Сommit
5ff55322d9
2 измененных файлов с 24 добавлено и 4 удалено
  1. 12 2
      install/hst-install-debian.sh
  2. 12 2
      install/hst-install-ubuntu.sh

+ 12 - 2
install/hst-install-debian.sh

@@ -866,8 +866,18 @@ check_result $? "apt-get install failed"
 # Install Hestia packages from local folder
 # Install Hestia packages from local folder
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
     dpkg -i $withdebs/hestia_*.deb
     dpkg -i $withdebs/hestia_*.deb
-    dpkg -i $withdebs/hestia-php_*.deb
-    dpkg -i $withdebs/hestia-nginx_*.deb
+
+    if [ -z $(ls "$withdebs/hestia-php_*.deb" 2>/dev/null) ]; then
+        apt-get -y install hestia-php > /dev/null 2>&1
+    else
+        dpkg -i $withdebs/hestia-php_*.deb
+    fi
+
+    if [ -z $(ls "$withdebs/hestia-nginx_*.deb" 2>/dev/null) ]; then
+        apt-get -y install hestia-nginx > /dev/null 2>&1
+    else
+        dpkg -i $withdebs/hestia-nginx_*.deb
+    fi
 fi
 fi
 
 
 # Restoring autostart policy
 # Restoring autostart policy

+ 12 - 2
install/hst-install-ubuntu.sh

@@ -840,8 +840,18 @@ check_result $? "apt-get install failed"
 # Install Hestia packages from local folder
 # Install Hestia packages from local folder
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
 if [ ! -z "$withdebs" ] && [ -d "$withdebs" ]; then
     dpkg -i $withdebs/hestia_*.deb
     dpkg -i $withdebs/hestia_*.deb
-    dpkg -i $withdebs/hestia-php_*.deb
-    dpkg -i $withdebs/hestia-nginx_*.deb
+
+    if [ -z $(ls "$withdebs/hestia-php_*.deb" 2>/dev/null) ]; then
+        apt-get -y install hestia-php > /dev/null 2>&1
+    else
+        dpkg -i $withdebs/hestia-php_*.deb
+    fi
+
+    if [ -z $(ls "$withdebs/hestia-nginx_*.deb" 2>/dev/null) ]; then
+        apt-get -y install hestia-nginx > /dev/null 2>&1
+    else
+        dpkg -i $withdebs/hestia-nginx_*.deb
+    fi
 fi
 fi
 
 
 # Restoring autostart policy
 # Restoring autostart policy