Move Avahi files from freedombox-setup

Avahi daemon is being managed in Plinth, so it makes sense for Plinth to be
providing the service files. Service files can be managed so that when service
is not available, it is not advertised using Avahi.

Install service files.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Signed-off-by: Prachi Srivastava <prachi@swecha.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2017-10-04 19:19:11 -04:00
1 parent c8233a7247
commit d6f79b96be
6 files changed
+59 -1

No files matched your search

+7 -1
View File
@@ -21,6 +21,7 @@ Plinth module for service discovery.
from django.utils.translation import ugettext_lazy as _
from plinth import actions
from plinth import cfg
from plinth import service as service_module
from plinth.menu import main_menu
@@ -35,7 +36,7 @@ is_essential = True
managed_services = ['avahi-daemon']
managed_packages = ['avahi-daemon']
managed_packages = ['avahi-daemon', 'avahi-utils']
name = _('Service Discovery')
@@ -66,6 +67,11 @@ def init():
def setup(helper, old_version=False):
"""Install and configure the module."""
helper.install(managed_packages)
# Reload avahi-daemon now that first-run does not reboot. After performing
# Plinth package installation, new Avahi files will be available and
# require restart.
helper.call('post', actions.superuser_run, 'service',
['reload', 'avahi-daemon'])
class AvahiServiceView(ServiceView):