Sunil Mohan Adapa 8ab665a7a2
mldonkey: Add app to freedombox-share group
- To be able to write to folders shared with other apps.

- Increment app version so that already installed apps also get upgraded and
mldonkey becomes part of freedombox-share group.

- Ensure that app does not get enabled after upgrade.

- Relax path restrictions for write access so that mldonkey can write to
external disks and root disk shared folders.

Closes: #1813.

Tests performed:

- Install app freshly mldonkey user is part of freedombox-share group.

- Install app without changes. Switch to a branch with changes. Run ./setup.py
install. The app is upgraded after run. mldonkey user is now part of
freedombox-share group. To check run sudo actions/users get-group-users
freedombox-share.

- Modify options -> Shares and Add Share with a group shared folder with
strategy incoming_files. Remove old share with strategy incoming_files.
Downloading a new file means it will be stored in the shared folder.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-05-26 09:37:05 +03:00

36 lines
815 B
Plaintext

[Unit]
Description=MLDonkey: Multi-protocol, peer-to-peer file sharing server
After=syslog.target network.target
ConditionPathExists=/var/lib/mldonkey/downloads.ini
Documentation=man:mlnet(1) http://mldonkey.sourceforge.net/Main_Page
[Service]
ExecStart=
ExecStart=/usr/bin/mlnet
ExecStop=
Group=mldonkey
IgnoreSIGPIPE=yes
KillMode=control-group
LockPersonality=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=full
RemainAfterExit=no
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictRealtime=yes
StateDirectory=mldonkey
SystemCallArchitectures=native
Type=simple
User=mldonkey
WorkingDirectory=/var/lib/mldonkey
[Install]
WantedBy=multi-user.target