-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
45 lines (35 loc) · 1.25 KB
/
setup.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
37
38
39
40
41
42
43
44
45
#!/bin/bash
lightCyan='\033[1;36m'
NC='\033[0m' # No Color
skip_fastfetch=""
# Loop through all parameters
while [[ "$#" -gt 0 ]]; do
case $1 in
--skip_fastfetch) # If the parameter --long is found
skip_fastfetch="1"
;;
esac
shift # Jump to the next argument
done
printf "${lightCyan}Uninstall neofetch${NC}\n"
apt remove neofetch -y
if [[ "$skip_fastfetch" == "1" ]]; then
printf "${lightCyan}Skip fastfetch installation${NC}\n"
else
printf "${lightCyan}Install fastfetch${NC}\n"
add-apt-repository ppa:zhangsongcui3371/fastfetch -y
apt install fastfetch -y
fi
printf "${lightCyan}Remove /etc/update-motd.d/01-neofetch file${NC}\n"
rm -f /etc/update-motd.d/01-neofetch
printf "${lightCyan}Create /etc/update-motd.d/01-fastfetch file${NC}\n"
rm -f /etc/update-motd.d/01-fastfetch
cp -v 01-fastfetch /etc/update-motd.d/01-fastfetch
chmod 755 /etc/update-motd.d/01-fastfetch
printf "${lightCyan}Create /etc/ssh/banner file${NC}\n"
rm -f /etc/ssh/banner
cp -v banner /etc/ssh/banner
printf "${lightCyan}Customize SSH configuration (/etc/ssh/sshd_config)${NC}\n"
sed -i 's/#Banner none/Banner \/etc\/ssh\/banner/g' /etc/ssh/sshd_config
printf "${lightCyan}Restart SSH service${NC}\n"
systemctl restart ssh.service