Răsfoiți Sursa

Fix/2020 10 always restart hestia service (#1307)

* Restart hestia service always and bump php and nginx version.

* Restart hestia service always and bump php and nginx version.

* Set propper permission for postinst.

* Set propper permission for postinst.
Raphael Schneeberger 5 ani în urmă
părinte
comite
878ae5526a
5 a modificat fișierele cu 25 adăugiri și 3 ștergeri
  1. 1 1
      src/deb/nginx/control
  2. 5 0
      src/deb/nginx/postinst
  3. 1 1
      src/deb/php/control
  4. 12 0
      src/deb/php/postinst
  5. 6 1
      src/hst_autocompile.sh

+ 1 - 1
src/deb/nginx/control

@@ -1,7 +1,7 @@
 Source: hestia-nginx
 Package: hestia-nginx
 Priority: optional
-Version: 1.19.2
+Version: 1.19.3
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com

+ 5 - 0
src/deb/nginx/postinst

@@ -21,4 +21,9 @@ source /usr/local/hestia/conf/hestia.conf
 # Reset backend port
 if [ ! -z "$BACKEND_PORT" ]; then
     /usr/local/hestia/bin/v-change-sys-port $BACKEND_PORT
+fi
+
+# Restart hestia service
+if [ -f "/etc/init.d/hestia" ]; then
+    systemctl restart hestia > /dev/null 2>&1
 fi

+ 1 - 1
src/deb/php/control

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

+ 12 - 0
src/deb/php/postinst

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+if [ "$1" != "configure" ]; then
+    exit 0
+fi
+
+# Restart hestia service
+if [ -f "/etc/init.d/hestia" ]; then
+    systemctl restart hestia > /dev/null 2>&1
+fi

+ 6 - 1
src/hst_autocompile.sh

@@ -366,11 +366,16 @@ if [ "$PHP_B" = true ] ; then
     if [ -z "$use_src_folder" ]; then
       download_file $GIT_REP/php/control
       download_file $GIT_REP/php/copyright
+      download_file $GIT_REP/php/postinst
     else
       cp $BUILD_DIR/hestiacp-$branch/src/deb/php/control ./
       cp $BUILD_DIR/hestiacp-$branch/src/deb/php/copyright ./
+      cp $BUILD_DIR/hestiacp-$branch/src/deb/php/postinst ./
     fi
 
+    # Set permission
+    chmod +x postinst
+
     # Move php directory
     cd ..
     mv ${BUILD_DIR}/usr/local/hestia/php usr/local/hestia/
@@ -451,7 +456,7 @@ if [ "$HESTIA_B" = true ]; then
     
 
     # Set permission
-    chmod +x postinst
+    chmod 755 postinst
 
     # Move needed directories
     cd $BUILD_DIR/hestiacp-$branch