-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalma-inicial.sh
36 lines (25 loc) · 1017 Bytes
/
alma-inicial.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# /bin/bash
#Get script path
SCRIPT=$(readlink -f "$0")
echo -e "Disable selinux"
sudo sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
sudo sestatus
echo -e "Disable firewall"
systemctl stop firewalld
systemctl disable firewalld
echo -e "Change SSH port to 9001"
echo "Port 9001" >> /etc/ssh/sshd_config
echo -e "Change root color"
bashrc='/etc/bashrc'
script64='IyBDb2xvcnMgaW4gVGVybWluYWwKaWYgWyAkVVNFUiA9IHJvb3QgXTsgdGhlbgogICAgICAgIFBTMT0nXFtcMDMzWzE7MzFtXF1bXHVAXGggXFddXCRcW1wwMzNbMG1cXSAnCmVsc2UKICAgICAgICBQUzE9J1xbXDAzM1swMTszMm1cXVx1QFxoXFtcMDMzWzAwbVxdIFxbXDAzM1swMTszNG1cXVxXXFtcMDMzWzAwbVxdXFtcMDMzWzE7MzJtXF1cJFxbXDAzM1ttXF0gJwpmaQo='
echo $script64 | base64 -d >> $bashrc
echo -e "Change timezone to Europe/Zagreb"
timedatectl set-timezone Europe/Zagreb
echo -e "EPEL"
dnf install epel-release -y
echo -e "HTOP & VNSTAT & FTP & NANO & SCREEN"
dnf install htop vnstat ftp nano screen -y
echo -e "Done for now \nPlease reboot"
echo -e "Clean up"
rm -rf "$SCRIPT"
bash