From daa7c326b8930dfbd75d4c169a16390ad94553a8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 28 Apr 2025 14:09:38 -0700 Subject: [PATCH] minetest: Work with new luanti binary in Trixie - Based on suggestion from Benedek[1]. Links 1) https://salsa.debian.org/freedombox-team/freedombox/-/issues/2514#note_608054 Tests: - On Trixie, freshly install minetest server. The server is successfully running. Command line for the process shows that gameid is minetest_game. Configuration file is /etc/luanti/default.conf. - Update configuration. The update is successful. The configuration /etc/minetest/minetest.conf is created. The server command line shows using /etc/minetest/minetest.conf as the configuration file. - On Bookworm, freshly install minetest server. The server is running. Updating configuration works. Command line shows that /etc/minetest/minetest.conf is being used. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .../systemd/system/minetest-server.service.d/freedombox.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/modules/minetest/data/usr/lib/systemd/system/minetest-server.service.d/freedombox.conf b/plinth/modules/minetest/data/usr/lib/systemd/system/minetest-server.service.d/freedombox.conf index d61eea865..6a3d7483a 100644 --- a/plinth/modules/minetest/data/usr/lib/systemd/system/minetest-server.service.d/freedombox.conf +++ b/plinth/modules/minetest/data/usr/lib/systemd/system/minetest-server.service.d/freedombox.conf @@ -1,4 +1,4 @@ # Workaround for Debian bug #1090067 [Service] ExecStart= -ExecStart=/usr/lib/minetest/minetestserver --config /etc/minetest/minetest.conf --logfile /var/log/minetest/minetest.log --gameid minetest_game +ExecStart=/usr/bin/sh -c 'if [ -e /etc/minetest/minetest.conf ] ; then CONFIG_FILE=/etc/minetest/minetest.conf; else CONFIG_FILE=/etc/luanti/default.conf; fi; if [ -x /usr/lib/minetest/minetestserver ] ; then /usr/lib/minetest/minetestserver --config $$CONFIG_FILE --logfile /var/log/minetest/minetest.log --gameid minetest_game; else exec /usr/libexec/luanti/luantiserver --config $$CONFIG_FILE --logfile /var/log/luanti/default/server.log --gameid $LUANTI_GAMEID; fi'