mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add an option to disable the 'YunoHost' panel overlay in web apps (#1071)
* Add an option to disable the 'YunoHost' panel overlay in apps * set default value for overlay as true * Add a hook to auto-update nginx conf + fix deprecated 'service regen-conf' * Change name of setting to ssowat.panel_overlay.enabled * [fix] Duplicate function * Quote var, just in case the var is empty for some reason Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
a03b62245d
commit
30421954a4
2 changed files with 8 additions and 2 deletions
|
@ -47,6 +47,12 @@ do_pre_regen() {
|
||||||
|
|
||||||
# install / update plain conf files
|
# install / update plain conf files
|
||||||
cp plain/* "$nginx_conf_dir"
|
cp plain/* "$nginx_conf_dir"
|
||||||
|
# remove the panel overlay if this is specified in settings
|
||||||
|
panel_overlay=$(yunohost settings get 'ssowat.panel_overlay.enabled')
|
||||||
|
if [ "$panel_overlay" == "false" ] || [ "$panel_overlay" == "False" ]
|
||||||
|
then
|
||||||
|
echo "#" > "${nginx_conf_dir}/yunohost_panel.conf.inc"
|
||||||
|
fi
|
||||||
|
|
||||||
# retrieve variables
|
# retrieve variables
|
||||||
main_domain=$(cat /etc/yunohost/current_host)
|
main_domain=$(cat /etc/yunohost/current_host)
|
||||||
|
|
|
@ -94,10 +94,10 @@ DEFAULTS = OrderedDict(
|
||||||
("smtp.relay.user", {"type": "string", "default": ""}),
|
("smtp.relay.user", {"type": "string", "default": ""}),
|
||||||
("smtp.relay.password", {"type": "string", "default": ""}),
|
("smtp.relay.password", {"type": "string", "default": ""}),
|
||||||
("backup.compress_tar_archives", {"type": "bool", "default": False}),
|
("backup.compress_tar_archives", {"type": "bool", "default": False}),
|
||||||
|
("ssowat.panel_overlay.enabled", {"type": "bool", "default": True}),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def settings_get(key, full=False):
|
def settings_get(key, full=False):
|
||||||
"""
|
"""
|
||||||
Get an entry value in the settings
|
Get an entry value in the settings
|
||||||
|
@ -376,7 +376,7 @@ def trigger_post_change_hook(setting_name, old_value, new_value):
|
||||||
#
|
#
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
|
||||||
|
@post_change_hook("ssowat.panel_overlay.enabled")
|
||||||
@post_change_hook("security.nginx.compatibility")
|
@post_change_hook("security.nginx.compatibility")
|
||||||
def reconfigure_nginx(setting_name, old_value, new_value):
|
def reconfigure_nginx(setting_name, old_value, new_value):
|
||||||
if old_value != new_value:
|
if old_value != new_value:
|
||||||
|
|
Loading…
Add table
Reference in a new issue