nginx: remove old 'yunohost_panel.conf' stuff

This commit is contained in:
Alexandre Aubin 2024-02-03 18:39:02 +01:00
parent 98701ebdab
commit 41da1daf02
2 changed files with 2 additions and 19 deletions

View file

@ -1,12 +0,0 @@
# This is some old code that worked with the old portal
# We need to rethink wether we want to keep something similar,
# or drop the feature
# # Insert YunoHost button + portal overlay
# sub_filter </head> '<script type="text/javascript" src="/ynh_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynh_overlay.css"><script type="text/javascript" src="/ynhtheme/custom_portal.js"></script><link type="text/css" rel="stylesheet" href="/ynhtheme/custom_overlay.css"></head>';
# sub_filter_once on;
# # Apply to other mime types than text/html
# sub_filter_types application/xhtml+xml;
# # Prevent YunoHost panel files from being blocked by specific app rules
# location ~ (ynh_portal.js|ynh_overlay.css|ynh_userinfo.json|ynhtheme/custom_portal.js|ynhtheme/custom_overlay.css) {
# }

View file

@ -23,7 +23,6 @@ do_init_regen() {
cp global.conf "$nginx_conf_dir"
cp ssowat.conf "$nginx_conf_dir"
cp yunohost_http_errors.conf.inc "$nginx_conf_dir"
cp yunohost_panel.conf.inc "$nginx_conf_dir"
cp yunohost_sso.conf.inc "$nginx_conf_dir"
@ -66,14 +65,10 @@ do_pre_regen() {
cp global.conf "$nginx_conf_dir"
cp ssowat.conf "$nginx_conf_dir"
cp yunohost_http_errors.conf.inc "$nginx_conf_dir"
cp yunohost_panel.conf.inc "$nginx_conf_dir"
cp yunohost_sso.conf.inc "$nginx_conf_dir"
# remove the panel overlay if this is specified in settings
panel_overlay="$(jq -r '.ssowat_panel_overlay_enabled' <<< "$YNH_SETTINGS" | int_to_bool)"
if [ "$panel_overlay" == "False" ]; then
echo "#" >"${nginx_conf_dir}/yunohost_panel.conf.inc"
fi
# Legacy file to remove
touch "$nginx_conf_dir"/yunohost_panel.conf.inc
# retrieve variables
main_domain=$(cat /etc/yunohost/current_host)