From 95e179d65de450309aa383da7fd1e9208417791e Mon Sep 17 00:00:00 2001 From: godot Date: Thu, 18 Jul 2024 18:46:25 +0200 Subject: [PATCH] reversing and repairing --- script.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/script.sh b/script.sh index 0351607..ae9879c 100755 --- a/script.sh +++ b/script.sh @@ -4,20 +4,16 @@ printf "Better to run as root, because of permisions handeling.\n" sleep 2 -sudo apt update & - printf "Do you want to set up firewall rules by iptables? [Y/n]: \n" read ansFirewallSetup - if [[ "$ansFirewallSetup" =~ ("N"|"n") ]]; then printf "+ Thanks, working on next bit\n" -else - apt install iptables -y +else printf "Do you want to block non-LAN ssh connections? [Y/n/castom]: " read sshBlockRange @@ -57,12 +53,19 @@ sleep 2 # Just to be shure printf "\n+ Starting to upgrade base system\n\n" +sudo apt update sudo apt upgrade -y # Installing depandencies printf "\n+ Installing depandencies \n\n" sudo apt install openjdk-17-jre-headless screen p7zip-full -y +if [[ "$ansFirewallSetup" =~ ("Y"|"y") || -z $ansFirewallSetup ]]; then + + sudo apt install iptables -y + +fi + # User and groupe managment printf "\n+ Creating user minecraft and basic file structure" groupadd minecraft