Update dsmon.sh
This commit is contained in:
11
dsmon.sh
11
dsmon.sh
@@ -334,7 +334,16 @@ GETCRONTAB(){
|
||||
apt install -yq sshpass > /dev/null 2>&1
|
||||
fi
|
||||
hostname=$(hostname)
|
||||
crontab -l | sshpass -p${1} ssh -o 'StrictHostKeyChecking no' nm_crontab_user@10.10.10.50 "cat > /opt/idssys/nodemgmt/crontabs/${hostname}.crontab"
|
||||
|
||||
if [ "$(CHECK_HOST 10.10.10.50)" != "false" ]; then
|
||||
nmip=10.10.10.50
|
||||
elif [ "$(CHECK_HOST 100.100.55.1)" != "false" ]; then
|
||||
nmip=100.100.55.1
|
||||
else
|
||||
nmip=
|
||||
fi
|
||||
|
||||
[ "${nmip}" != "" ] && crontab -l | sshpass -p${1} ssh -o 'StrictHostKeyChecking no' nm_crontab_user@${nmip} "cat > /opt/idssys/nodemgmt/crontabs/${hostname}.crontab"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user