framework: Remove module init() functions

Fixes #1906

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2020-08-03 18:06:48 -04:00
1 parent 0df674dc20
commit d92ca09e19
60 files changed
+110 -573

No files matched your search

+2 -12
View File
@@ -90,21 +90,11 @@ class SyncthingApp(app_module.App):
daemon = Daemon('daemon-syncthing', managed_services[0])
self.add(daemon)
users_and_groups = UsersAndGroups(
'users-and-groups-syncthing', [SYSTEM_USER], self.groups)
users_and_groups = UsersAndGroups('users-and-groups-syncthing',
[SYSTEM_USER], self.groups)
self.add(users_and_groups)
def init():
"""Initialize the module."""
global app
app = SyncthingApp()
setup_helper = globals()['setup_helper']
if setup_helper.get_state() != 'needs-setup' and app.is_enabled():
app.set_enabled(True)
def setup(helper, old_version=None):
"""Install and configure the module."""
helper.install(managed_packages)