From 8df60f596ed3f27c5b11589e2adf357048b5d100 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Tue, 2 Mar 2021 16:36:51 +0200 Subject: [PATCH] deluge, mldonkey, syncthing, transmission: Depend on nslcd.service Add nslcd.service as a dependency to the services that depend on users and groups defined in LDAP. deluged, mldonkey-server, syncthing@syncthing and transmission-daemon services depend on freedombox-share LDAP group. Closes #2061 Tests done with apps deluge, mldonkey, syncthing and transmission, in both debian stable and testing dev containers, after applying changes: - After installing an app and after reboot, the daemon user is a member of the freedombox-share group. - Checked with the `systemctl show` command that nslcd.service is added to After=... dependencies. - All the functional tests pass (in Debian stable, closed manually the syncthing usage reporting form - #2059). Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- .../data/lib/systemd/system/deluged.service.d/freedombox.conf | 3 +++ .../systemd/system/mldonkey-server.service.d/freedombox.conf | 2 +- .../system/syncthing@syncthing.service.d/freedombox.conf | 3 +++ .../system/transmission-daemon.service.d/freedombox.conf | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 plinth/modules/deluge/data/lib/systemd/system/deluged.service.d/freedombox.conf create mode 100644 plinth/modules/syncthing/data/lib/systemd/system/syncthing@syncthing.service.d/freedombox.conf create mode 100644 plinth/modules/transmission/data/lib/systemd/system/transmission-daemon.service.d/freedombox.conf diff --git a/plinth/modules/deluge/data/lib/systemd/system/deluged.service.d/freedombox.conf b/plinth/modules/deluge/data/lib/systemd/system/deluged.service.d/freedombox.conf new file mode 100644 index 000000000..749d0d636 --- /dev/null +++ b/plinth/modules/deluge/data/lib/systemd/system/deluged.service.d/freedombox.conf @@ -0,0 +1,3 @@ +# The service depends on users and groups defined in LDAP +[Unit] +After=nslcd.service diff --git a/plinth/modules/mldonkey/data/lib/systemd/system/mldonkey-server.service.d/freedombox.conf b/plinth/modules/mldonkey/data/lib/systemd/system/mldonkey-server.service.d/freedombox.conf index ef27515fa..d0256a633 100644 --- a/plinth/modules/mldonkey/data/lib/systemd/system/mldonkey-server.service.d/freedombox.conf +++ b/plinth/modules/mldonkey/data/lib/systemd/system/mldonkey-server.service.d/freedombox.conf @@ -1,6 +1,6 @@ [Unit] Description=MLDonkey: Multi-protocol, peer-to-peer file sharing server -After=syslog.target network.target +After=syslog.target network.target nslcd.service ConditionPathExists=/var/lib/mldonkey/downloads.ini Documentation=man:mlnet(1) http://mldonkey.sourceforge.net/Main_Page diff --git a/plinth/modules/syncthing/data/lib/systemd/system/syncthing@syncthing.service.d/freedombox.conf b/plinth/modules/syncthing/data/lib/systemd/system/syncthing@syncthing.service.d/freedombox.conf new file mode 100644 index 000000000..749d0d636 --- /dev/null +++ b/plinth/modules/syncthing/data/lib/systemd/system/syncthing@syncthing.service.d/freedombox.conf @@ -0,0 +1,3 @@ +# The service depends on users and groups defined in LDAP +[Unit] +After=nslcd.service diff --git a/plinth/modules/transmission/data/lib/systemd/system/transmission-daemon.service.d/freedombox.conf b/plinth/modules/transmission/data/lib/systemd/system/transmission-daemon.service.d/freedombox.conf new file mode 100644 index 000000000..749d0d636 --- /dev/null +++ b/plinth/modules/transmission/data/lib/systemd/system/transmission-daemon.service.d/freedombox.conf @@ -0,0 +1,3 @@ +# The service depends on users and groups defined in LDAP +[Unit] +After=nslcd.service