This commit is contained in:
Milan Meduna 2020-10-25 12:15:26 +01:00
parent fc04a11c1e
commit f91d58d5b8

View file

@ -69,12 +69,6 @@ echo "[Install]" >> /etc/systemd/system/minetestsrv.service
echo "WantedBy=multi-user.target" >> /etc/systemd/system/minetestsrv.service echo "WantedBy=multi-user.target" >> /etc/systemd/system/minetestsrv.service
systemctl daemon-reload 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 if [ $first_install = "y" ]; then
echo "Configuring firstinstall config" echo "Configuring firstinstall config"
apt install postgresql postgresql-contrib -y 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 "port = "$mt_port"" >> /home/minetest/.minetest/minetest.conf
echo "enable_rollback_recording = "$mt_enable_rollback_recording"" >> /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 "default_privs = "$mt_default_privs"" >> /home/minetest/.minetest/minetest.conf
echo "Fix privileges on /home/minetest" echo "Fix privileges on /home/minetest"
chown minetest:minetest /home/minetest/ -cR chown minetest:minetest /home/minetest/ -cR
if [ $ufw_enable = "y" ]; then 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
fi fi