mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
[autopatch] Autopatch to migrate to new permission system
This commit is contained in:
parent
5cd502c98f
commit
f2171940cb
2 changed files with 19 additions and 9 deletions
|
@ -62,7 +62,6 @@ ynh_script_progression --message="Get infos from manifest" -w 1
|
||||||
ynh_app_setting_set "$app" domain "$domain"
|
ynh_app_setting_set "$app" domain "$domain"
|
||||||
ynh_app_setting_set "$app" path "$path_url"
|
ynh_app_setting_set "$app" path "$path_url"
|
||||||
ynh_app_setting_set "$app" admin "$admin"
|
ynh_app_setting_set "$app" admin "$admin"
|
||||||
ynh_app_setting_set "$app" is_public "$is_public"
|
|
||||||
ynh_app_setting_set "$app" language "$language"
|
ynh_app_setting_set "$app" language "$language"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -265,7 +264,7 @@ ynh_add_fpm_config
|
||||||
#chown -R www-data: $final_path
|
#chown -R www-data: $final_path
|
||||||
|
|
||||||
# Set the app as temporarily public for curl call
|
# Set the app as temporarily public for curl call
|
||||||
#ynh_app_setting_set $app skipped_uris "/"
|
|
||||||
|
|
||||||
# Reload SSOwat config
|
# Reload SSOwat config
|
||||||
yunohost app ssowatconf
|
yunohost app ssowatconf
|
||||||
|
@ -362,9 +361,9 @@ yunohost service add snmpd -d "Management of SNMP Daemon"
|
||||||
yunohost service add zabbix-server -d "Management Zabbix server daemon : Collect, agregate, compute and notify"
|
yunohost service add zabbix-server -d "Management Zabbix server daemon : Collect, agregate, compute and notify"
|
||||||
yunohost service add zabbix-agent -d "Management Zabbix agent daemon : send informations about this host to the server"
|
yunohost service add zabbix-agent -d "Management Zabbix agent daemon : send informations about this host to the server"
|
||||||
|
|
||||||
# Make app public if for importing template
|
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway
|
|
||||||
ynh_app_setting_set "$app" unprotected_uris "/"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
|
@ -397,11 +396,12 @@ disable_admin_user
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Make app private if necessary
|
|
||||||
if [ "$is_public" -eq 0 ]
|
|
||||||
|
# Make app public if necessary
|
||||||
|
if [ "$is_public" -eq 1 ]
|
||||||
then
|
then
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
ynh_app_setting_delete "$app" unprotected_uris
|
|
||||||
fi
|
fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX AND PHP-FPM
|
# RELOAD NGINX AND PHP-FPM
|
||||||
|
|
|
@ -141,6 +141,16 @@ then
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# Migrate legacy permissions to new system
|
||||||
|
#=================================================
|
||||||
|
if ynh_legacy_permissions_exists
|
||||||
|
then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
yunohost service stop zabbix-server
|
yunohost service stop zabbix-server
|
||||||
yunohost service stop zabbix-agent
|
yunohost service stop zabbix-agent
|
||||||
|
|
Loading…
Add table
Reference in a new issue