reversing and repairing
This commit is contained in:
parent
5f808ab965
commit
95e179d65d
13
script.sh
13
script.sh
@ -4,20 +4,16 @@ printf "Better to run as root, because of permisions handeling.\n"
|
|||||||
|
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
sudo apt update &
|
|
||||||
|
|
||||||
printf "Do you want to set up firewall rules by iptables? [Y/n]: \n"
|
printf "Do you want to set up firewall rules by iptables? [Y/n]: \n"
|
||||||
read ansFirewallSetup
|
read ansFirewallSetup
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$ansFirewallSetup" =~ ("N"|"n") ]]; then
|
if [[ "$ansFirewallSetup" =~ ("N"|"n") ]]; then
|
||||||
|
|
||||||
printf "+ Thanks, working on next bit\n"
|
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]: "
|
printf "Do you want to block non-LAN ssh connections? [Y/n/castom]: "
|
||||||
read sshBlockRange
|
read sshBlockRange
|
||||||
@ -57,12 +53,19 @@ sleep 2
|
|||||||
# Just to be shure
|
# Just to be shure
|
||||||
printf "\n+ Starting to upgrade base system\n\n"
|
printf "\n+ Starting to upgrade base system\n\n"
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
sudo apt upgrade -y
|
sudo apt upgrade -y
|
||||||
|
|
||||||
# Installing depandencies
|
# Installing depandencies
|
||||||
printf "\n+ Installing depandencies \n\n"
|
printf "\n+ Installing depandencies \n\n"
|
||||||
sudo apt install openjdk-17-jre-headless screen p7zip-full -y
|
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
|
# User and groupe managment
|
||||||
printf "\n+ Creating user minecraft and basic file structure"
|
printf "\n+ Creating user minecraft and basic file structure"
|
||||||
groupadd minecraft
|
groupadd minecraft
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user