Sunil Mohan Adapa ae50ceaeb0
radicale, bepasty: Fix issue with failed diagnostic test
Fixes: #2571.

- During backup, a service related to backup is stopped and then started back
again after the backup. In case of .socket unit, the .service unit is not being
stopped and it continues to listen on the socket path. When the .socket unit is
started back again, it tries to listen on the socket path and fails.

- To fix the issue, when running stop, restart, etc. operations on a .socket
file, try to perform that operations that we actually intend.

Tests:

- Unit tests pass

- Functional tests for bepasty and radicale work.

- After taking a radicale backup uwsgi-app@radicale.socket does not become
inactive (works when service is running or stopped). uwsgi-app@radicale.service
stops if it is running, backup doesn't fail if service is not running.

- After taking a radicale backup uwsgi-app@bepasty-freedombox.socket does not
become inactive (works when service is running or stopped).
uwsgi-app@bepasty-freedombox.service stops if it is running, backup doesn't fail
if service is not running.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-04-27 19:13:14 -04:00
..
2020-06-28 21:01:45 -04:00