-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_ubuntu20.sh
More file actions
32 lines (26 loc) · 966 Bytes
/
Copy pathsetup_ubuntu20.sh
File metadata and controls
32 lines (26 loc) · 966 Bytes
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
#!/bin/bash
set -e
SCRIPT_NAME=$(basename $0)
pre_config(){
sudo apt update && wait && sudo apt install -y unzip zip wget net-tools logrotate apt-transport-https ca-certificates curl gnupg lsb-release
}
dislble_ufw(){
systemctl disable ufw.service && systemctl stop ufw.service
}
optimize_network(){
wget --no-check-certificate https://raw.githubusercontent.com/0xdevelop/shell_tools/main/optimize_network.sh && chmod a+x ./optimize_network.sh && ./optimize_network.sh
}
NEW_SSH_PORT=22
input_ssh_port(){
while true; do
echo "====Please Input SSH Port For New===="
read -p "Please Input(请输入): " input_string
if [[ -z "${input_string// }" ]]; then
INPUT_DOMAIN="$input_string"
break
else
echo "Invalid Domain"
fi
done
}
pre_config && wait && dislble_ufw && wait && optimize_network && wait && echo "Ubuntu 20.0.4 LTS Setup End" && wait && rm -rf $SCRIPT_NAME