minetest-mm/reset-map-and-players
2024-12-19 12:55:40 +01:00

14 lines
520 B
Bash

#!/bin/bash
source config-file
echo "Stop minetestsrv service"
systemctl stop minetestsrv
echo "Drop and recreate map and players databases"
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;"