1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zabbix_ynh.git synced 2024-09-03 20:36:14 +02:00

Update upgrade

This commit is contained in:
Mickael-Martin 2018-12-07 13:39:03 +01:00
parent 6bf76fd422
commit 71e2973164

View file

@ -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