minidlna: Make app installable inside unprivileged container

Use systemd-sysctl to reload sysctl configuration which ignores
fs.inotify.max_user_watches parameter inside unprivileged
container.

Closes #1830

Tests performed:

- Install minidlna using FreedomBox on KVM virtual machine. Installation
succeeds and the max_user_watches parameter
`cat /proc/sys/fs/inotify/max_user_watches` has changed.

- Install minidlna using FreedomBox on unprivileged systemd-nspawn container.
Installation succeeds (and the max_user_watches parameter hasn't changed).

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2020-04-28 16:16:45 +03:00 committed by Sunil Mohan Adapa
parent 40ac492a87
commit 4d59713d79
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -47,7 +47,7 @@ def subcommand_setup(arguments):
aug.set('/files/etc/sysctl.conf/fs.inotify.max_user_watches', '100000')
aug.save()
subprocess.run(['sysctl', '--system'], check=True)
subprocess.run(['systemctl', 'restart', 'systemd-sysctl'], check=True)
def subcommand_get_media_dir(arguments):