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 <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2025-04-28 14:09:38 -07:00 committed by James Valleroy
parent e0c5d042d5
commit daa7c326b8
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -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'