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 2019-02-05 13:29:14 +01:00
parent 6d9b9aaf76
commit fcee0467a0

View file

@ -57,16 +57,17 @@ fi
haveDefaultAdminDisabled=$(mysql -BN -u$db_user -p$db_pwd $db_name -BN -e "SELECT count(id) from \`users_groups\` where userid=1 and usrgrpid=9") haveDefaultAdminDisabled=$(mysql -BN -u$db_user -p$db_pwd $db_name -BN -e "SELECT count(id) from \`users_groups\` where userid=1 and usrgrpid=9")
if [ "$haveDefaultAdminDisabled" -eq 1 ] ;then if [ "$haveDefaultAdminDisabled" -eq 1 ] ;then
echo "Enable default admin" ynh_print_info "Enable default admin"
#enable default admin temporaly #enable default admin temporaly
mysql -u$db_user -p$db_pwd $db_name -e "DELETE FROM users_groups where usrgrpid=9 and userid=1;" mysql -u$db_user -p$db_pwd $db_name -e "DELETE FROM users_groups where usrgrpid=9 and userid=1;"
else else
echo "default admin already enabled" ynh_print_info "default admin already enabled"
fi fi
#================================================= #=================================================
# Import Yunohost template # Import Yunohost template
#================================================= #=================================================
ynh_print_info "Import Yunohost template"
#disable sso temporaly #disable sso temporaly
ynh_app_setting_set $app unprotected_uris "/" ynh_app_setting_set $app unprotected_uris "/"
systemctl reload nginx systemctl reload nginx
@ -167,7 +168,7 @@ path_url=$(ynh_normalize_url_path $path_url)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
ynh_print_info "Check if new zabbix version is available on repo"
ynh_package_update ynh_package_update
zabbixServerInstalledVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Installed: \K(.*)") zabbixServerInstalledVersion=$(apt-cache policy zabbix-server-mysql | grep -Po "Installed: \K(.*)")
@ -228,7 +229,7 @@ fi
#================================================= #=================================================
# RE-ENABLE SSOWAT # RE-ENABLE SSOWAT
#================================================= #=================================================
ynh_print_info "re-enable SSOWAT"
# Make app public if necessary # Make app public if necessary
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then then