minetest-mm/reset-map-and-players

15 lines
520 B
Text
Raw Normal View History

2020-10-25 13:07:02 +01:00
#!/bin/bash
source config-file
echo "Stop minetestsrv service"
systemctl stop minetestsrv
2020-10-27 17:35:32 +01:00
echo "Drop and recreate map and players databases"
2020-10-25 13:07:02 +01:00
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