From 558e697c725b568006cf88b2442df37c462c96d6 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 25 Oct 2020 10:01:45 +0000 Subject: [PATCH] fix? --- setup-mt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup-mt b/setup-mt index 0b0f8ac4..d93da8f1 100755 --- a/setup-mt +++ b/setup-mt @@ -81,10 +81,11 @@ sudo -u postgres createdb minetest_auth sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password '$psql_postgres_user_password';" sudo -u postgres psql -U postgres -d postgres -c "alter user minetest with password '$psql_minetest_user_password';" -sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database 'minetest' 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" 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;" +mkdir -p /home/minetest/.minetest/worlds/world/ 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 @@ -94,6 +95,8 @@ echo "auth_backend = postgresql" >> /home/minetest/.minetest/worlds/world/world. 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" +chown minetest:minetest /home/minetest/ -cR fi systemctl start minetestsrv systemctl enable minetestsrv