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

Resolve php-hestia installation issue due to missing validation check.

Raphael Schneeberger 5 лет назад
Родитель
Сommit
e7b18da0e2
2 измененных файлов с 6 добавлено и 1 удалено
  1. 1 1
      src/deb/php/control
  2. 5 0
      src/deb/php/postinst

+ 1 - 1
src/deb/php/control

@@ -1,7 +1,7 @@
 Source: hestia-php
 Source: hestia-php
 Package: hestia-php
 Package: hestia-php
 Priority: optional
 Priority: optional
-Version: 7.4.11
+Version: 7.4.11~1
 Section: admin
 Section: admin
 Maintainer: HestaCP <info@hestiacp.com>
 Maintainer: HestaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com
 Homepage: https://www.hestiacp.com

+ 5 - 0
src/deb/php/postinst

@@ -6,6 +6,11 @@ if [ "$1" != "configure" ]; then
     exit 0
     exit 0
 fi
 fi
 
 
+# Run triggers below only on updates
+if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
+    exit
+fi
+
 # Restart hestia service
 # Restart hestia service
 if [ -f "/etc/init.d/hestia" ]; then
 if [ -f "/etc/init.d/hestia" ]; then
     systemctl restart hestia > /dev/null 2>&1
     systemctl restart hestia > /dev/null 2>&1