minetest-mm/mods-apply-world.mt-regenerate-from-config-file
2020-10-25 17:13:25 +01:00

28 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
source config-file
systemctl stop minetestsrv
rm -rf /home/minetest/.minetest/mods
cp -r mods /home/minetest/.minetest/mods
echo "gameid = minetest" > /home/minetest/.minetest/worlds/world/world.mt
echo "backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.mt
echo "creative_mode = false" >> /home/minetest/.minetest/worlds/world/world.mt
echo "enable_damage = true" >> /home/minetest/.minetest/worlds/world/world.mt
echo "player_backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.mt
echo "auth_backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.mt
echo "pgsql_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest" >> /home/minetest/.minetest/worlds/world/world.mt
echo "pgsql_player_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest_players" >> /home/minetest/.minetest/worlds/world/world.mt
echo "pgsql_auth_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest_auth" >> /home/minetest/.minetest/worlds/world/world.mt
echo "
load_mod_wieldview = true
load_mod_shields = true
load_mod_3d_armor_ui = true
load_mod_3d_armor = true
load_mod_3d_armor_sfinv = true
load_mod_3d_armor_ip = true
load_mod_3d_armor_stand = true
" >> /home/minetest/.minetest/worlds/world/world.mt
chown minetest:minetest /home/minetest/ -cR
systemctl start minetestsrv