From 4c30d5e8a54ae0f29428828cd1962e07496ecb6f Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Fri, 3 Jun 2016 18:06:42 +0530 Subject: [PATCH] firewall: Don't infer firewall service name Now that all firewall ports are explicitly specified for all services, it is safer to remove automatic infering of firewall service name from systemd service name. This Closes: #468 where firewall status is being shown for 'software upgrades'. --- plinth/service.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/plinth/service.py b/plinth/service.py index 9095ef19e..5f228efb8 100644 --- a/plinth/service.py +++ b/plinth/service.py @@ -37,18 +37,17 @@ class Service(object): for operation. - service_id: unique service name. If possible this should be the name of - the service on operating system level (as in /etc/init.d/). + the service's systemd unit file (without the extension). - name: service name as to be displayed in the GUI - - is_enabled (optional): Boolean, or a Function returning Boolean - - enable (optional): Function - - disable (optional): Function - - is_running (optional): Boolean, or a Function returning Boolean - + - is_enabled (optional): Boolean or a method returning Boolean + - enable (optional): method + - disable (optional): method + - is_running (optional): Boolean or a method returning Boolean """ def __init__(self, service_id, name, ports=None, is_external=False, is_enabled=None, enable=None, disable=None, is_running=None): if ports is None: - ports = [service_id] + ports = [] if is_enabled is None: is_enabled = self._default_is_enabled @@ -123,4 +122,4 @@ def init(): is_external=True, is_enabled=True) Service('plinth', format_lazy(_('{box_name} Web Interface (Plinth)'), box_name=_(cfg.box_name)), - ports=['https'], is_external=True, is_enabled=True) + ports=['https'], is_external=True, is_enabled=True)