diff --git a/bootstrap_remote.sh b/bootstrap_remote.sh index 4082301afd44e993c70115b74290883cb95e93f4..d2f0ddb8af88205f9b36fd7653657d0f05a56688 100755 --- a/bootstrap_remote.sh +++ b/bootstrap_remote.sh @@ -1,11 +1,29 @@ #!/bin/bash -remote_command="cd ~; \ +host_list="src/hostlist.txt" +command1="cd ~; \ which git &>/dev/null || yum install -y git &>/dev/null; \ git -C .mysetting pull || git clone https://code.ihep.ac.cn/zhangxuantong/mysetting.git .mysetting; \ cd .mysetting; \ source bootstrap.sh git;" -host_list="src/hostlist.txt" +command2="yum upgrade -y --noplugins --disablerepo fts3-el9" +command3="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=$command1 + ;; +esac ./tools/firewall-update.sh $host_list for remote_host in $(cat src/hostlist.txt); do