minidlna: Move sysctl config to /etc/sysctl.d/50-freedombox.conf

/etc/sysctl.conf is owned by procps package.

Test: Run minidlna install on fresh image.
- /etc/sysctl.conf is not modified.
- /etc/sysctl.d/50-freedombox.conf has the expected content.
- /proc/sys/fs/inotify/max_user_watches contains 100000.

- Running with these changes upgrades app version and triggers a setup. Changes
in /etc/sysctl.conf are removed. After undoing the changes /etc/sysctl.conf is
identical to pristine version installed from procps package. This can be
obtained by running; rm -f /etc/sysctl.conf ; apt install --reinstall procps -o
Dpkg::Options::=--force-confmiss

Closes #1802.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Undo changes done in /etc/sysctl.conf in older versions]
[sunil: Increment app version to trigger configuration migration]
[sunil: Ensure that app is not re-enabled during migration]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy committed 2020-05-18 08:49:24 -04:00
1 parent 0b1219a90c
commit 3c85846fa2
2 files changed
+31 -10

No files matched your search

+3 -2
View File
@@ -13,7 +13,7 @@ from plinth.modules.users.components import UsersAndGroups
from .manifest import backup, clients # noqa
version = 1
version = 2
managed_packages = ['minidlna']
@@ -94,4 +94,5 @@ def setup(helper, old_version=None):
"""Install and configure the package"""
helper.install(managed_packages)
helper.call('post', actions.superuser_run, 'minidlna', ['setup'])
helper.call('post', app.enable)
if not old_version:
helper.call('post', app.enable)