reset-map-and-players 581 B

1234567891011121314151617
  1. #!/bin/bash
  2. source config-file
  3. echo "Stop minetestsrv service"
  4. systemctl stop minetestsrv
  5. echo "Drop and recreate map and players databases"
  6. sudo -u postgres dropdb minetest
  7. sudo -u postgres dropdb minetest_players
  8. sudo -u postgres createdb minetest
  9. sudo -u postgres createdb minetest_players
  10. sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest" to minetest;"
  11. sudo -u postgres psql -U postgres -d postgres -c "grant all privileges on database "minetest_players" to minetest;"
  12. echo "Start minetestsrv service"
  13. systemctl start minetestsrv