mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Merge branch 'testing' into 'master'
php-fpm service not necessary See merge request Mickael-Martin/zabbix_ynh!4
This commit is contained in:
commit
d00f4ea872
2 changed files with 43 additions and 38 deletions
|
@ -20,7 +20,6 @@
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7-fpm",
|
|
||||||
"mysql",
|
"mysql",
|
||||||
"snmpd"
|
"snmpd"
|
||||||
],
|
],
|
||||||
|
|
|
@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
trustedversion="4.0.3-1+stretch"
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
admin=$(ynh_app_setting_get $app admin)
|
admin=$(ynh_app_setting_get $app admin)
|
||||||
|
@ -70,8 +70,11 @@ zabbixFrontendCandidateVersion=$(apt-cache policy zabbix-frontend-php | grep -Po
|
||||||
zabbixagentInstalledVersion=$(apt-cache policy zabbix-agent | grep -Po "Installed: \K(.*)")
|
zabbixagentInstalledVersion=$(apt-cache policy zabbix-agent | grep -Po "Installed: \K(.*)")
|
||||||
zabbixagentCandidateVersion=$(apt-cache policy zabbix-agent | grep -Po "Candidate: \K(.*)")
|
zabbixagentCandidateVersion=$(apt-cache policy zabbix-agent | grep -Po "Candidate: \K(.*)")
|
||||||
|
|
||||||
if [ "$zabbixServerInstalledVersion" != "$zabbixServerCandidateVersion" -o "$zabbixFrontendInstalledVersion" != "$zabbixFrontendCandidateVersion" -o "$zabbixagentInstalledVersion" != "$zabbixagentCandidateVersion" ]
|
if [ "$trustedversion" == "$zabbixServerCandidateVersion" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
|
if [ "$zabbixServerInstalledVersion" != "$zabbixServerCandidateVersion" -o "$zabbixFrontendInstalledVersion" != "$zabbixFrontendCandidateVersion" -o "$zabbixagentInstalledVersion" != "$zabbixagentCandidateVersion" ]
|
||||||
|
then
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -107,6 +110,9 @@ then
|
||||||
rm -fr /tmp/zabbix*
|
rm -fr /tmp/zabbix*
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
else
|
||||||
|
ynh_print_info "Nothing to update ! (Already up to date)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ynh_print_info "Nothing to update !"
|
ynh_print_info "Nothing to update ! (Trusted version)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue