2021-08-31 00:35:23 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
MINETEST_PATH=/home/pi/.minetest
|
|
|
|
WORLD_NAME=astroport
|
|
|
|
WORLD_PATH=$MINETEST_PATH/worlds/$WORLD_NAME
|
|
|
|
|
2021-09-02 12:32:02 +02:00
|
|
|
rm -rf $WORLD_PATH
|
2021-08-31 00:35:23 +02:00
|
|
|
mkdir $WORLD_PATH
|
|
|
|
|
2021-09-01 19:40:04 +02:00
|
|
|
cp map.sqlite $WORLD_PATH/
|
2021-08-31 00:35:23 +02:00
|
|
|
|
|
|
|
echo "
|
|
|
|
gameid = minetest
|
|
|
|
auth_backend = sqlite3
|
|
|
|
player_backend = sqlite3
|
|
|
|
backend = sqlite3
|
|
|
|
" > $WORLD_PATH/world.mt
|
|
|
|
|
|
|
|
cd ~/.zen/astrXbian/minetest
|
2021-09-01 19:40:04 +02:00
|
|
|
cat ./minetest-common.conf > /home/pi/.minetest/worlds/astroport/minetest.conf
|
2021-08-31 00:35:23 +02:00
|
|
|
echo "
|
|
|
|
|
|
|
|
server_name = Astroport "$XZUID"
|
|
|
|
|
|
|
|
# Message of the day displayed to players connecting.
|
|
|
|
# type: string
|
|
|
|
motd = Bienvenue sur l'Astroport \""$XZUID"\". Un petit cube auto-hébergé par son heureux propriétaire.
|
|
|
|
|
|
|
|
server_description = Astroport
|
|
|
|
|
|
|
|
# Domain name of server, to be displayed in the serverlist.
|
|
|
|
# type: string
|
|
|
|
#server_address = astroport.com
|
|
|
|
|
|
|
|
# Homepage of server, to be displayed in the serverlist.
|
|
|
|
# type: string
|
|
|
|
#server_url = https://astroport.com
|
|
|
|
|
|
|
|
# Automatically report to the serverlist.
|
|
|
|
# type: bool
|
|
|
|
server_announce = false
|
|
|
|
|
|
|
|
# Network port to listen (UDP).
|
|
|
|
# This value will be overridden when starting from the main menu.
|
|
|
|
# type: int
|
2021-09-01 19:40:04 +02:00
|
|
|
port = 30001
|
2021-08-31 00:35:23 +02:00
|
|
|
|
|
|
|
# The network interface that the server listens on.
|
|
|
|
# type: string
|
|
|
|
# bind_address =
|
|
|
|
|
|
|
|
|
2021-09-01 19:40:04 +02:00
|
|
|
" >> /home/pi/.minetest/worlds/astroport/minetest.conf
|
2021-08-31 00:35:23 +02:00
|
|
|
|
2021-09-02 12:32:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
#
|
|
|
|
# SystemD
|
|
|
|
#
|
|
|
|
#########################################################################################
|
|
|
|
|
|
|
|
|
|
|
|
MINETEST_LOG_FILE=/var/log/minetest/minetest-astroport.log
|
|
|
|
|
|
|
|
sudo touch $MINETEST_LOG_FILE
|
|
|
|
sudo chown pi:games $MINETEST_LOG_FILE
|
|
|
|
chmod 664 $MINETEST_LOG_FILE
|
|
|
|
|
|
|
|
echo "
|
|
|
|
[Unit]
|
|
|
|
Description=Minetest multiplayer server minetest.conf server config
|
|
|
|
Documentation=man:minetestserver(6)
|
|
|
|
After=network.target
|
|
|
|
RequiresMountsFor=/var/games/minetest-server
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=on-failure
|
|
|
|
User=pi
|
|
|
|
Group=games
|
|
|
|
ExecStart=/usr/lib/minetest/minetestserver --port 30001 --world /home/pi/.minetest/worlds/astroport --config /home/pi/.minetest/worlds/astroport/minetest.conf --logfile /var/log/minetest/minetest-astroport.log
|
|
|
|
StandardOutput=null
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
" >> $WORLD_PATH/systemd.service
|
|
|
|
|
|
|
|
sudo systemctl enable $WORLD_PATH/systemd.service
|
|
|
|
|
|
|
|
sudo systemctl start astroport-minetest.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#########################################################################################
|
|
|
|
#
|
|
|
|
# MODS
|
|
|
|
#
|
|
|
|
#########################################################################################
|
|
|
|
|
|
|
|
|
2021-08-31 00:35:23 +02:00
|
|
|
mkdir $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods ]; then
|
|
|
|
mkdir $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ## mg - Experimental Mapgen for Minetest
|
|
|
|
#
|
|
|
|
# if [ ! -d $MINETEST_PATH/mods/mg-master ]; then
|
|
|
|
#
|
|
|
|
# if [ ! -f $MINETEST_PATH/mods/mg.zip ]; then
|
|
|
|
# wget https://github.com/minetest-mods/mg/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/mg.zip
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# unzip $MINETEST_PATH/mods/mg.zip -d $MINETEST_PATH/mods
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# cp -r $MINETEST_PATH/mods/mg-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
|
|
|
|
## startanode
|
2021-09-01 19:40:04 +02:00
|
|
|
#
|
|
|
|
# if [ ! -d $MINETEST_PATH/mods/startanode-master ]; then
|
|
|
|
#
|
|
|
|
# if [ ! -f $MINETEST_PATH/mods/startanode.zip ]; then
|
|
|
|
# wget https://github.com/minetest-mods/startanode/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/startanode.zip
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# unzip $MINETEST_PATH/mods/startanode.zip -d $MINETEST_PATH/mods
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# cp -r $MINETEST_PATH/mods/startanode-master $WORLD_PATH/worldmods
|
2021-08-31 00:35:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-01 19:40:04 +02:00
|
|
|
## Spawnbuilder
|
|
|
|
#
|
2021-08-31 00:35:23 +02:00
|
|
|
# spawnBuilderLocation=`find $MINETEST_PATH/mods -type d -name spawnbuilder`
|
2021-09-01 19:40:04 +02:00
|
|
|
# if [ -z $spawnBuilderLocation ]; then
|
|
|
|
#
|
|
|
|
# if [ ! -f $MINETEST_PATH/mods/spawnbuilder.zip ]; then
|
|
|
|
# wget https://repo.or.cz/minetest_spawnbuilder.git/snapshot/1.1.0.zip -O $MINETEST_PATH/mods/spawnbuilder.zip
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# unzip $MINETEST_PATH/mods/spawnbuilder.zip -d $MINETEST_PATH/mods/spawnbuilder/
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# mkdir $WORLD_PATH/worldmods/spawnbuilder
|
|
|
|
# cp -r $MINETEST_PATH/mods/spawnbuilder/minetest_spawnbuilder-*/* $WORLD_PATH/worldmods/spawnbuilder
|
|
|
|
#
|
|
|
|
# echo "
|
|
|
|
# #Side length of the surface area of the spawn platform
|
|
|
|
# #If the number is odd, the platform will be centered at spawn.
|
|
|
|
# #Using a width lower than 3 is not recommended.
|
|
|
|
# spawnbuilder_width (Spawn platform width) int 5 1
|
|
|
|
# " > $WORLD_PATH/worldmods/spawnbuilder/mod.conf
|
2021-08-31 00:35:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Unified inventory mod
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/unified_inventory-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/unified_inventory.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/unified_inventory/archive/master.zip -O $MINETEST_PATH/mods/unified_inventory.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/unified_inventory.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/unified_inventory-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
## Spawn mod
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/spawn_command-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/spawn_command.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/spawn_command/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/spawn_command.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/spawn_command.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/spawn_command-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
|
|
|
|
## Jukebok mod
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/jukebox-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/jukebox.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/jukebox/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/jukebox.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/jukebox.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/jukebox-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
## xdecor mod
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/xdecor-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/xdecor.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/xdecor/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/xdecor.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/xdecor.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/xdecor-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
## Display modpack
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/display_modpack-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/display_modpack.zip ]; then
|
|
|
|
wget https://github.com/pyrollo/display_modpack/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/display_modpack.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/display_modpack.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/display_modpack-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
## Letters
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/letters-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/letters.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/letters/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/letters.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/letters.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/letters-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
## mydoors
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d $MINETEST_PATH/mods/mydoors-master ]; then
|
|
|
|
|
|
|
|
if [ ! -f $MINETEST_PATH/mods/mydoors.zip ]; then
|
|
|
|
wget https://github.com/minetest-mods/mydoors/archive/refs/heads/master.zip -O $MINETEST_PATH/mods/mydoors.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
unzip $MINETEST_PATH/mods/mydoors.zip -d $MINETEST_PATH/mods
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -r $MINETEST_PATH/mods/mydoors-master $WORLD_PATH/worldmods
|
|
|
|
|
|
|
|
|
|
|
|
|