minetest-mm/reset-map-and-players
2020-10-25 20:54:52 +01:00

16 lines
568 B
Bash

#!/bin/bash
source config-file
echo "Stop minetestsrv service"
systemctl stop minetestsrv
echo "Drop and recreate map database"
sudo -u postgres dropdb minetest
sudo -u postgres dropdb minetest_players
sudo -u postgres createdb minetest
sudo -u postgres createdb minetest_players
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;"
echo "Start minetestsrv service"
systemctl start minetestsrv