minetest-mm/mods-apply-world.mt-regener...

28 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-10-25 16:58:28 +01:00
#!/bin/bash
source config-file
systemctl stop minetestsrv
rm -rf /home/minetest/.minetest/mods
cp -r mods /home/minetest/.minetest/mods
chown minetest:minetest /home/minetest/ -cR
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
systemctl start minetestsrv