deluge: Fix daemon user not in freedombox-share group after installation

Add the debian-deluged user to the freedombox-share group *before* running
app setup. The app setup process restarts the deluged daemon
after which the process has correct group ownerships.

Tests done in Debian stable and testing dev containers:
- After installing the deluge app, checked from /proc/--process-id--/status that
the deluged daemon process has the freedombox-share group.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2021-03-02 18:20:57 +02:00 committed by Sunil Mohan Adapa
parent 8df60f596e
commit 631e10c09e
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -98,6 +98,6 @@ class DelugeApp(app_module.App):
def setup(helper, old_version=None):
"""Install and configure the module."""
helper.install(managed_packages)
helper.call('post', actions.superuser_run, 'deluge', ['setup'])
add_user_to_share_group(SYSTEM_USER)
helper.call('post', actions.superuser_run, 'deluge', ['setup'])
helper.call('post', app.enable)