Browse Source

Move preinstall hook

Jaap Marcus 4 years ago
parent
commit
9d61c29001
2 changed files with 5 additions and 4 deletions
  1. 5 0
      src/deb/hestia/postinst
  2. 0 4
      src/deb/hestia/preinst

+ 5 - 0
src/deb/hestia/postinst

@@ -36,6 +36,11 @@ upgrade_init_backup
 # Initialize logging
 upgrade_init_logging
 
+# Check if preinstall hook exists
+if [ -e "/etc/hestiacp/hooks/pre_install.sh" ]; then
+/etc/hestiacp/hooks/pre_install.sh
+fi
+
 # Set up console display and welcome message
 upgrade_welcome_message_log >> $LOG
 upgrade_welcome_message

+ 0 - 4
src/deb/hestia/preinst

@@ -19,7 +19,3 @@ HESTIA_V=$(dpkg -s hestia | grep -i version | awk '{ print $2 }')
 if [ ! "$HESTIA_V" = "$VERSION" ]; then
     sed -i "s/VERSION=.*/VERSION='$HESTIA_V'/g" /usr/local/hestia/conf/hestia.conf
 fi
-
-if [ -e "/etc/hestiacp/hooks/pre_install.sh" ]; then
-    /etc/hestiacp/hooks/pre_install.sh
-fi