210 lines
5.5 KiB
Bash
210 lines
5.5 KiB
Bash
|
#!/bin/sh
|
|||
|
|
|||
|
MINETEST_PATH=/home/pi/.minetest
|
|||
|
WORLD_NAME=astroport
|
|||
|
WORLD_PATH=$MINETEST_PATH/worlds/$WORLD_NAME
|
|||
|
|
|||
|
rm -R $WORLD_PATH
|
|||
|
|
|||
|
mkdir $WORLD_PATH
|
|||
|
|
|||
|
|
|||
|
echo "
|
|||
|
gameid = minetest
|
|||
|
auth_backend = sqlite3
|
|||
|
player_backend = sqlite3
|
|||
|
backend = sqlite3
|
|||
|
" > $WORLD_PATH/world.mt
|
|||
|
|
|||
|
cd ~/.zen/astrXbian/minetest
|
|||
|
cat ./minetest-common.conf > ./minetest.conf
|
|||
|
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
|
|||
|
port = 30010
|
|||
|
|
|||
|
# The network interface that the server listens on.
|
|||
|
# type: string
|
|||
|
# bind_address =
|
|||
|
|
|||
|
|
|||
|
" >> ./minetest.conf
|
|||
|
|
|||
|
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
|
|||
|
|
|||
|
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
|
|||
|
|
|||
|
|
|||
|
|
|||
|
# ## Spawnbuilder
|
|||
|
#
|
|||
|
# spawnBuilderLocation=`find $MINETEST_PATH/mods -type d -name spawnbuilder`
|
|||
|
# 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
|
|||
|
|
|||
|
|
|||
|
|
|||
|
## 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
|
|||
|
|
|||
|
|
|||
|
|