From f91d58d5b8576d26d7d542e96842c4d543d0164b Mon Sep 17 00:00:00 2001 From: root Date: Sun, 25 Oct 2020 12:15:26 +0100 Subject: [PATCH] fw_fix --- setup-mt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/setup-mt b/setup-mt index e7150b87..91a0c29c 100755 --- a/setup-mt +++ b/setup-mt @@ -69,12 +69,6 @@ echo "[Install]" >> /etc/systemd/system/minetestsrv.service echo "WantedBy=multi-user.target" >> /etc/systemd/system/minetestsrv.service systemctl daemon-reload -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 @@ -118,11 +112,15 @@ 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 +apt install ufw -y +ufw allow proto tcp to any port $ufw_ssh_port_for_accept +ufw allow proto udp to any port $mt_port +ufw enable fi fi