ENH: Ajout scripts de configuration de serveur Minetest

This commit is contained in:
Boris 2021-08-31 00:35:23 +02:00
parent 062ae4dbb2
commit e9bda280dd
4 changed files with 315 additions and 0 deletions

1
minetest/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
minetest.conf

View File

@ -0,0 +1,102 @@
enable_damage = false
enable_pvp = false
creative_mode = true
enable_build_where_you_stand = true
# Controls length of day/night cycle.
# Examples:
# 72 = 20min, 360 = 4min, 1 = 24hour, 0 = day/night/whatever stays unchanged.
# type: int
time_speed = 1
# Name of map generator to be used when creating a new world.
# Creating a world in the main menu will override this.
# Current mapgens in a highly unstable state:
# - The optional floatlands of v7 (disabled by default).
# type: enum values: v7, valleys, carpathian, v5, flat, fractal, singlenode, v6
# mg_name = v7
mg_name = singlenode
# singlenode = que de l'air ; le mod "startanode" permet d'ajouter un cube au spawn
# Player is able to fly without being affected by gravity.
# This requires the "fly" privilege on the server.
# type: bool
free_move = true
# Fast movement (via the "special" key).
# This requires the "fast" privilege on the server.
# type: bool
fast_move = false
# The privileges that new users automatically get.
# See /privs in game for a full list on your server and mod configuration.
# type: string
default_privs = interact, shout, fly, fast
# Privileges that players with basic_privs can grant
# type: string
basic_privs = interact, shout, fly, fast
# If this is set, players will always (re)spawn at the given position.
# type: string
static_spawnpoint = (0, 24, 0)
# Where the map generator stops.
# Please note:
# - Limited to 31000 (setting above has no effect)
# - The map generator works in groups of 80x80x80 nodes (5x5x5 MapBlocks).
# - Those groups have an offset of -32, -32 nodes from the origin.
# - Only groups which are within the map_generation_limit are generated
# type: int min: 0 max: 31000
mapgen_limit = 216
mg_flags = trees,decorations
mgv6_spflags = jungles,biomeblend,mudflow,snowbiomes,noflat,trees
mgv6_freq_desert = 0.05
mgv6_freq_beach = 0.95
# Humidity variation for biomes.
# type: noise_params_2d
mgv6_np_humidity = {
offset = 0.5,
scale = 0.5,
spread = (2, 3, 2),
seed = 72384,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = eased
}
# Defines tree areas and tree density.
# type: noise_params_2d
mgv6_np_trees = {
offset = 0,
scale = 1,
spread = (2, 3, 2),
seed = 2,
octaves = 4,
persistence = 0.66,
lacunarity = 2.0,
flags = eased
}
# Defines areas with sandy beaches.
# type: noise_params_2d
mgv6_np_beach = {
offset = 0,
scale = 1,
spread = (50, 50, 50),
seed = 59420,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = eased
}
secure.trusted_mods = wiki

209
minetest/recreate_world.sh Executable file
View File

@ -0,0 +1,209 @@
#!/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

3
minetest/start_server.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
/usr/lib/minetest/minetestserver --port 30010 --world /home/pi/.minetest/worlds/astroport --config /home/pi/.zen/astrXbian/minetest/minetest.conf