mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Fix upgrade from 4.0
This commit is contained in:
parent
f912137c9e
commit
9fe703098d
2 changed files with 5 additions and 43 deletions
|
@ -11,7 +11,7 @@ else
|
|||
libsnmpd_version="libsnmp30"
|
||||
fi
|
||||
|
||||
pkg_dependencies="libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 fonts-dejavu-core patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base $libsnmpd_version snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php "
|
||||
pkg_dependencies="libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 fonts-dejavu-core patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base $libsnmpd_version snmptrapd snmpd libjs-prototype jq libssh-4 zabbix-agent zabbix-frontend-php zabbix-server-mysql"
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
|
|
|
@ -24,8 +24,7 @@ db_user=$(ynh_app_setting_get --app=$app --key=db_user)
|
|||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
|
||||
trustedversion="5.0-1+stretch"
|
||||
is_public=$(ynh_permission_has_user --permission=main --user=visitors && echo 1 || echo 0)
|
||||
trustedversion="5.0.0-1+stretch"
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -162,6 +161,8 @@ then
|
|||
install_zabbix_repo
|
||||
DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
apt-get upgrade -y --option Dpkg::Options::=--force-confdef --option Dpkg::Options::=--force-confold
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -193,32 +194,6 @@ convert_ZabbixDB
|
|||
|
||||
set_mediatype_default_yunohost
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION WITH CURL
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping application with CURL..."
|
||||
|
||||
# Set the app as temporarily public for curl call
|
||||
ynh_script_progression --message="Configuring SSOwat..."
|
||||
# Making the app public for curl
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
enable_admin_user
|
||||
|
||||
import_template
|
||||
|
||||
link_template
|
||||
|
||||
disable_admin_user
|
||||
|
||||
disable_guest_user
|
||||
|
||||
# Remove the public access
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -248,22 +223,9 @@ yunohost service add zabbix-agent --description="Management Zabbix agent daemon
|
|||
ynh_script_progression --message="Starting a systemd service..."
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app-server --action="restart" --log_path="/var/log/$app/${app}_server.log"
|
||||
ynh_systemd_action --service_name=$app-server --action="restart" --log_path="/var/log/$app/${app}_server.log" --line_match="server #0 started"
|
||||
ynh_systemd_action --service_name=$app-agent --action="restart" --log_path="/var/log/$app/${app}_agent.log"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# Everyone can access the app.
|
||||
# The "main" permission is automatically created before the install script.
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue