change
This commit is contained in:
parent
f8ae64657d
commit
7366cc2e80
2 changed files with 15 additions and 5 deletions
|
@ -3,7 +3,6 @@ source config-file
|
||||||
systemctl stop minetestsrv
|
systemctl stop minetestsrv
|
||||||
rm -rf /home/minetest/.minetest/mods
|
rm -rf /home/minetest/.minetest/mods
|
||||||
cp -r mods /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 "gameid = minetest" > /home/minetest/.minetest/worlds/world/world.mt
|
||||||
echo "backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.mt
|
echo "backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.mt
|
||||||
|
@ -24,4 +23,6 @@ load_mod_3d_armor_sfinv = true
|
||||||
load_mod_3d_armor_ip = true
|
load_mod_3d_armor_ip = true
|
||||||
load_mod_3d_armor_stand = true
|
load_mod_3d_armor_stand = true
|
||||||
" >> /home/minetest/.minetest/worlds/world/world.mt
|
" >> /home/minetest/.minetest/worlds/world/world.mt
|
||||||
|
|
||||||
|
chown minetest:minetest /home/minetest/ -cR
|
||||||
systemctl start minetestsrv
|
systemctl start minetestsrv
|
||||||
|
|
|
@ -18,10 +18,10 @@ sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on databa
|
||||||
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_players" to minetest;"
|
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_players" to minetest;"
|
||||||
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_auth" to minetest;"
|
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_auth" to minetest;"
|
||||||
|
|
||||||
echo "Backup configs"
|
echo "Backup minetest.conf"
|
||||||
mv -f /home/minetest/.minetest/minetest.conf /tmp/minetest.conf
|
mv -f /home/minetest/.minetest/minetest.conf /tmp/minetest.conf
|
||||||
mv -f /home/minetest/.minetest/worlds/world/world.mt /tmp/world.mt
|
|
||||||
|
|
||||||
|
echo "Remove /home/minetest"
|
||||||
rm -rf /home/minetest
|
rm -rf /home/minetest
|
||||||
|
|
||||||
echo "Clone minetest_game $mt_version"
|
echo "Clone minetest_game $mt_version"
|
||||||
|
@ -29,10 +29,19 @@ mkdir -p /home/minetest/.minetest/games/
|
||||||
rm -rf /home/minetest/.minetest/games/minetest
|
rm -rf /home/minetest/.minetest/games/minetest
|
||||||
git clone --depth 1 --branch "$mt_version" https://github.com/minetest/minetest_game.git /home/minetest/.minetest/games/minetest
|
git clone --depth 1 --branch "$mt_version" https://github.com/minetest/minetest_game.git /home/minetest/.minetest/games/minetest
|
||||||
|
|
||||||
echo "Restore configs"
|
echo "Restore minetest.conf and regenerate world.mt"
|
||||||
mkdir -p /home/minetest/.minetest/worlds/world/
|
mkdir -p /home/minetest/.minetest/worlds/world/
|
||||||
mv -f /tmp/minetest.conf /home/minetest/.minetest/minetest.conf
|
mv -f /tmp/minetest.conf /home/minetest/.minetest/minetest.conf
|
||||||
mv -f /tmp/world.mt /home/minetest/.minetest/worlds/world/world.mt
|
|
||||||
|
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 "Fix privileges on /home/minetest"
|
echo "Fix privileges on /home/minetest"
|
||||||
chown minetest:minetest /home/minetest/ -cR
|
chown minetest:minetest /home/minetest/ -cR
|
Loading…
Reference in a new issue