Skip to content
Snippets Groups Projects
Commit 4866c49b authored by root's avatar root
Browse files

update firewall and add dnf-automatic

parent abd94960
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ function preparation(){
# for git and wsl
# prepare required repositories and packages
declare -a release_array=(epel-release)
declare -a req_array=(net-tools bind-utils telnet ctags vim wget curl openssh openssl git xauth)
declare -a req_array=(net-tools bind-utils telnet ctags vim wget curl openssh openssl git xauth dnf-automatic)
if [[ $USER == "root" ]]; then
echo -e "\e[32mInstalling required repositories...\e[0m"
yum install -y -q ${release_array[@]}
......
......@@ -12,19 +12,15 @@ command1="cd ~; \
git -C .mysetting pull || git clone https://code.ihep.ac.cn/zhangxuantong/mysetting.git .mysetting; \
cd .mysetting; \
source bootstrap.sh git;"
command2="yum upgrade -y --noplugins --disablerepo fts3-el9"
command3="cd ~; \
command2="cd ~; \
which git &>/dev/null || yum install -y git &>/dev/null; \
git -C node-exporter pull || git clone https://code.ihep.ac.cn/grid-services/monitoring/node-exporter.git node-exporter; \
cd node-exporter; \
source ./install.sh;"
case $1 in
update)
remote_command=$command2
;;
monitor)
remote_command=$command3
remote_command=$command2
;;
firewall)
./tools/firewall-update.sh $host_list
......
......@@ -68,8 +68,8 @@ init_iptables(){
fi
}
# Distroy IP tables
distroy_iptables(){
# Destroy IP tables
destroy_iptables(){
iptables -D DOCKER-USER -m set --match-set $IPSET src -p tcp --dport $PORT -j ACCEPT
iptables -D DOCKER-USER -p tcp --dport $PORT -j DROP
ipset destroy $IPSET
......@@ -79,4 +79,4 @@ distroy_iptables(){
init_iptables
resolve_hostnames
update_iptables
#distroy_iptables
#destroy_iptables
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment