minetest-mm/reset-map
2020-10-25 13:07:02 +01:00

14 lines
485 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 createdb minetest
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;"
echo "Start minetestsrv service"
systemctl start minetestsrv