edit_minetest.conf
This commit is contained in:
parent
558e697c72
commit
a19b489a2e
3 changed files with 61 additions and 2 deletions
17
config-file
17
config-file
|
@ -1,6 +1,21 @@
|
|||
mt_version="5.3.0"
|
||||
first_install=Y
|
||||
first_install=y
|
||||
ufw_enable=y
|
||||
ufw_ssh_port_for_accept=22
|
||||
|
||||
#This settings are applied only when first_install is set to Y
|
||||
psql_postgres_user_password="ExamplePassword"
|
||||
psql_minetest_user_password="ExamplePassword"
|
||||
mt_port=30000
|
||||
mt_admin=admin
|
||||
mt_language=en
|
||||
mt_enable_rollback_recording=true
|
||||
mt_default_privs="interact, shout, home"
|
||||
mt_max_users=40
|
||||
mt_motd="SERVER CREATED BY https://git.my-web.xyz/milan/minetest-mm.git"
|
||||
mt_ipv6_server=false
|
||||
mt_server_announce=false
|
||||
mt_server_url="https://example.tld"
|
||||
mt_server_address="example.tld"
|
||||
mt_server_description="SERVER CREATED BY https://git.my-web.xyz/milan/minetest-mm.git"
|
||||
mt_server_name="my minetest-mm server"
|
||||
|
|
30
setup-mt
30
setup-mt
|
@ -69,7 +69,13 @@ echo "[Install]" >> /etc/systemd/system/minetestsrv.service
|
|||
echo "WantedBy=multi-user.target" >> /etc/systemd/system/minetestsrv.service
|
||||
systemctl daemon-reload
|
||||
|
||||
if [ $first_install = "Y" ]; then
|
||||
if [ $ufw_enable = "y" ]; then
|
||||
apt install ufw -y
|
||||
ufw allow proto tcp from any port $ufw_ssh_port_for_accept
|
||||
ufw enable
|
||||
fi
|
||||
|
||||
if [ $first_install = "y" ]; then
|
||||
echo "Configuring firstinstall config"
|
||||
apt install postgresql postgresql-contrib -y
|
||||
pg_ctlcluster 12 main start
|
||||
|
@ -95,8 +101,30 @@ echo "auth_backend = postgresql" >> /home/minetest/.minetest/worlds/world/world.
|
|||
echo "pgsql_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest" >> /home/minetest/.minetest/worlds/world/world.mt
|
||||
echo "pgsql_player_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest_players" >> /home/minetest/.minetest/worlds/world/world.mt
|
||||
echo "pgsql_auth_connection = host=127.0.0.1 user=minetest password=$psql_minetest_user_password dbname=minetest_auth" >> /home/minetest/.minetest/worlds/world/world.mt
|
||||
|
||||
echo "disable_fire = true" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "disable_tnt = true" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_name = "$mt_server_name"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_description = "$mt_server_description"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_address = "$mt_server_address"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_url = "$mt_server_url"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_announce = "$mt_server_announce"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "ipv6_server = "$mt_ipv6_server"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "default_game = minetest" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "motd = "$mt_motd"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "max_users = "$mt_max_users"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "name = "$mt_admin"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "language = "$mt_language"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "port = "$mt_port"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "enable_rollback_recording = "$mt_enable_rollback_recording"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "default_privs = "$mt_default_privs"" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "Fix privileges on /home/minetest"
|
||||
chown minetest:minetest /home/minetest/ -cR
|
||||
|
||||
if [ $ufw_enable = "y" ]; then
|
||||
ufw allow proto udp from any port $mt_port
|
||||
fi
|
||||
|
||||
fi
|
||||
systemctl start minetestsrv
|
||||
systemctl enable minetestsrv
|
||||
|
|
16
test
Normal file
16
test
Normal file
|
@ -0,0 +1,16 @@
|
|||
echo "disable_fire = true >> /home/minetest/.minetest/minetest.conf
|
||||
echo "disable_tnt = true >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_name = "$mt_server_name" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_description = "$mt_server_description" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_address = "$mt_server_address" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_url = "$mt_server_url" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "server_announce = "$mt_server_announce" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "ipv6_server = "$mt_ipv6_server" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "default_game = minetest >> /home/minetest/.minetest/minetest.conf
|
||||
echo "motd = "$mt_motd" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "max_users = "$mt_max_users" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "name = "$mt_admin" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "language = "$mt_language" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "port = "$mt_port" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "enable_rollback_recording = "$mt_enable_rollback_recording" >> /home/minetest/.minetest/minetest.conf
|
||||
echo "default_privs = "$mt_default_privs" >> /home/minetest/.minetest/minetest.conf
|
Loading…
Reference in a new issue