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

Update templates during upgrade for per-domain OCSP & HSTS support

Kristan Kenney 6 лет назад
Родитель
Сommit
7d62175f9a
2 измененных файлов с 8 добавлено и 8 удалено
  1. 8 0
      install/upgrade/versions/1.0.1.sh
  2. 0 8
      install/upgrade/versions/1.00.0-190618.sh

+ 8 - 0
install/upgrade/versions/1.0.1.sh

@@ -20,6 +20,14 @@ source /usr/local/hestia/conf/hestia.conf
 
 
 ####### Place additional commands below. #######
 ####### Place additional commands below. #######
 
 
+# Back up old template files and install the latest versions
+if [ -d $HESTIA/data/templates/ ]; then
+    cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
+    $HESTIA/bin/v-update-web-templates
+    $HESTIA/bin/v-update-dns-templates
+	$HESTIA/bin/v-update-mail-templates
+fi
+
 # Update Apache and Nginx configuration to support new file structure
 # Update Apache and Nginx configuration to support new file structure
 echo "(*) Updating web server configuration..."
 echo "(*) Updating web server configuration..."
 if [ -f /etc/apache2/apache.conf ]; then
 if [ -f /etc/apache2/apache.conf ]; then

+ 0 - 8
install/upgrade/versions/1.00.0-190618.sh

@@ -61,14 +61,6 @@ if [ -d $HESTIA/data/packages/ ]; then
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
     cp -f $HESTIA/data/packages/default.pkg $HESTIA_BACKUP/packages/
 fi
 fi
 
 
-# Back up old template files and install the latest versions
-if [ -d $HESTIA/data/templates/ ]; then
-    cp -rf $HESTIA/data/templates $HESTIA_BACKUP/templates/
-    $HESTIA/bin/v-update-web-templates
-    $HESTIA/bin/v-update-dns-templates
-	$HESTIA/bin/v-update-mail-templates
-fi
-
 # Remove old Office 365 template as there is a newer version with an updated name
 # Remove old Office 365 template as there is a newer version with an updated name
 if [ -f $HESTIA/data/templates/dns/o365.tpl ]; then
 if [ -f $HESTIA/data/templates/dns/o365.tpl ]; then
     rm -f $HESTIA/data/templates/dns/o365.tpl
     rm -f $HESTIA/data/templates/dns/o365.tpl