14 lines
485 B
Bash
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
|