nalc-server/start.sh.example

40 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
2022-05-27 14:36:02 +02:00
#
# This is a startup script example you can adapt for your needs.
# It can take a server directory to start as argument else,
# it will use the current dir.
# If you want to use it, rename it to 'start.sh' and give it executable rights.
#
# If you want to start/stop the server as a system service you should not use this
# script. Please read the documentation for more informations.
#
serverdir="$1"
[ -z "$serverdir" ] && serverdir="$(pwd)"
if [ ! -e "$serverdir/nalc.conf" ]; then
echo "ERROR: nalc.conf not found!"
exit 1
else
. "$serverdir/nalc.conf"
fi
#DEBUG=$serverdir/logs/debug.log
#MOREDEBUG=$serverdir/logs/moredebug.log
#while true; do
# sleep 5
# echo "----------------------" >>$MOREDEBUG
# echo "Server restarted at "`date` >>$MOREDEBUG
# echo "----------------------" >>$MOREDEBUG
echo "0" >/tmp/players_c.txt
2022-05-27 14:36:02 +02:00
"$MINETEST_BIN" \
--world "$MINETEST_DIR/worlds/$WORLD_NAME/" \
--config "$MINETEST_DIR/minetest.conf" \
--gameid nalc_game \
2022-05-27 14:36:02 +02:00
--port $PORT \
# --logfile $DEBUG
2022-05-27 14:36:02 +02:00
#done &>> $MOREDEBUG