mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
users: Try-restart service after service is added to the sharing group
Try-restart the service (instead of restart) after adding service to the freedombox-share group to avoid starting the service if app is disabled. Tests performed: - Remove syncthing user from the freedombox-share group, disable syncthing app, increase app version. After the app is upgraded, verify that syncthing user is in the freedombox-share group and syncthing@syncthing.service remains disabled. - Remove syncthing user from the freedombox-share group, enable syncthing app, increase app version. After the app is upgraded, verify that syncthing user is in the freedombox-share group and logs show that syncthing@syncthing.service was restarted. Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
4187a19c34
commit
2d963ec461
@ -155,4 +155,4 @@ def add_user_to_share_group(username, service=None):
|
||||
actions.superuser_run(
|
||||
'users', ['add-user-to-group', username, 'freedombox-share'])
|
||||
if service:
|
||||
actions.superuser_run('service', ['restart', service])
|
||||
actions.superuser_run('service', ['try-restart', service])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user