Mickael-Martin 7 лет назад
Родитель
Сommit
71e2973164
1 измененных файлов с 4 добавлено и 33 удалено
  1. 4 33
      scripts/upgrade

+ 4 - 33
scripts/upgrade

@@ -85,44 +85,15 @@ rm -fr zabbix-*.deb
 apt-get -y --only-upgrade install zabbix-server-mysql zabbix-agent
 DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php
 
-#=================================================
-# NGINX CONFIGURATION
-#=================================================
-
-# Create a dedicated nginx config
-ynh_add_nginx_config
-
-#=================================================
-# UPGRADE DEPENDENCIES
-#=================================================
-
-ynh_install_app_dependencies deb1 deb2
-
-#=================================================
-# CREATE DEDICATED USER
-#=================================================
-
-# Create a dedicated user (if not existing)
-ynh_system_user_create $app
-
-#=================================================
-# PHP-FPM CONFIGURATION
-#=================================================
-
-# Create a dedicated php-fpm config
-ynh_add_fpm_config
 
 #=================================================
 # SPECIFIC UPGRADE
 #=================================================
-# ...
-#=================================================
 
-### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
-### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
-ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"
-# Recalculate and store the checksum of the file for the next upgrade.
-ynh_store_file_checksum "$final_path/CONFIG_FILE"
+ynh_restore_file "$final_path/conf/zabbix.conf.php" "final_path/conf/zabbix.conf.php"
+ynh_restore_file "/etc/zabbix/zabbix_server.conf" "/etc/zabbix/zabbix_server.conf"
+ynh_restore_file "/etc/zabbix/zabbix_agentd.conf" "/etc/zabbix/zabbix_agentd.conf"
+ynh_restore_file "/etc/zabbix/zabbix_agentd.d" "/etc/zabbix/zabbix_agentd.d"
 
 #=================================================
 # SETUP LOGROTATE