From 8670a56610517b059567c33d76642ae3318a78e6 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Wed, 24 Apr 2024 12:51:15 +0300 Subject: [PATCH] minidlna: Restart app when upgrading to reconfigure firewall Tested when minidlna app is running - after upgrade the ssdp port is open. Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/modules/minidlna/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plinth/modules/minidlna/__init__.py b/plinth/modules/minidlna/__init__.py index e1cd1089f..a301b9764 100644 --- a/plinth/modules/minidlna/__init__.py +++ b/plinth/modules/minidlna/__init__.py @@ -101,6 +101,11 @@ class MiniDLNAApp(app_module.App): users_privileged.remove_group('minidlna') apache_privileged.disable('minidlna-freedombox', 'config') + # Restart app to reload firewall + if self.is_enabled(): + self.disable() + self.enable() + if not old_version: self.enable()