2020-10-25 13:07:02 +01:00
|
|
|
#!/bin/bash
|
|
|
|
source config-file
|
|
|
|
|
|
|
|
echo "Stop minetestsrv service"
|
|
|
|
systemctl stop minetestsrv
|
|
|
|
|
|
|
|
echo "Drop and recreate map database"
|
|
|
|
sudo -u postgres dropdb minetest
|
2020-10-25 20:54:52 +01:00
|
|
|
sudo -u postgres dropdb minetest_players
|
2020-10-25 13:07:02 +01:00
|
|
|
sudo -u postgres createdb minetest
|
2020-10-25 20:54:52 +01:00
|
|
|
sudo -u postgres createdb minetest_players
|
2020-10-25 13:07:02 +01:00
|
|
|
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest" to minetest;"
|
2020-10-25 20:54:52 +01:00
|
|
|
sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_players" to minetest;"
|
2020-10-25 13:07:02 +01:00
|
|
|
|
|
|
|
echo "Start minetestsrv service"
|
|
|
|
systemctl start minetestsrv
|