19 lines
434 B
Plaintext

#!/usr/bin/with-contenv bash
# predefine some variables
world_part="--world "
# shellcheck disable=SC2154
world_set=$world
# set world_string variable to use user-defined world or default world.
if [ -z "$world" ]; then
world_string=" "
else
world_string=$world_part$world_set
fi
# shellcheck disable=SC2086
exec \
s6-setuidgid abc minetestserver $world_string \
--config /config/.minetest/main-config/minetest.conf --port 30000