app: Set app as enabled only when the daemon is enabled

- For avahi, datetime and SSH.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2019-06-06 18:11:32 -07:00 committed by James Valleroy
parent 20aa2abe3b
commit 23f37a3a3d
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 6 additions and 3 deletions

View File

@ -82,7 +82,8 @@ def init():
"""Intialize the service discovery module."""
global app
app = AvahiApp()
app.set_enabled(True)
if app.is_enabled():
app.set_enabled(True)
def setup(helper, old_version=None):

View File

@ -68,7 +68,8 @@ def init():
"""Intialize the date/time module."""
global app
app = DateTimeApp()
app.set_enabled(True)
if app.is_enabled():
app.set_enabled(True)
def setup(helper, old_version=None):

View File

@ -75,7 +75,8 @@ def init():
"""Intialize the ssh module."""
global app
app = SSHApp()
app.set_enabled(True)
if app.is_enabled():
app.set_enabled(True)
def setup(helper, old_version=None):