mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
add hook to reconfigure nginx or ssh on settings change
This commit is contained in:
parent
5d48640f3c
commit
9aa6cb6ac5
1 changed files with 11 additions and 0 deletions
|
@ -239,3 +239,14 @@ def _save_settings(settings, location=SETTINGS_PATH):
|
|||
settings_fd.write(result)
|
||||
except Exception as e:
|
||||
raise YunohostError('global_settings_cant_write_settings', reason=e)
|
||||
|
||||
@post_change_hook("security.ciphers.compatibility")
|
||||
def reconfigure_nginx(setting_name, old_value, new_value):
|
||||
if old_value != new_value:
|
||||
service_regen_conf("nginx")
|
||||
|
||||
@post_change_hook("service.ssh.ciphers.compatibility")
|
||||
def reconfigure_ssh(setting_name, old_value, new_value):
|
||||
if old_value != new_value:
|
||||
service_regen_conf("ssh")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue