minetest-mm/mods-apply-world.mt-regenerate-from-config-file

23 lines
1.3 KiB
Text
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
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
2020-10-25 20:59:37 +01:00
cat mods-list >> /home/minetest/.minetest/worlds/world/world.mt
2020-10-25 17:13:25 +01:00
chown minetest:minetest /home/minetest/ -cR
2020-10-25 20:54:52 +01:00
echo "Start minetestsrv service"
2020-10-25 16:58:28 +01:00
systemctl start minetestsrv