From e59df1a39274dd7889eb592314a4d931827488a1 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 26 Jan 2024 10:01:06 -0600 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index 2a564e5..cb1a2c2 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -395,14 +395,14 @@ RUNCMD_SUB(){ ip=${1} host=${2} tmpfile=/tmp/.dsmon.runcmd.${host// /-} - touch ${tmpfile}.running + touch ${tmpfile}.running > /dev/null 2>&1 echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host} - Running command: ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22}${idsCL[Default]}${idsST[Reset]}" >> ${tmpfile}.running if ssh_output=$(ssh -tq -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${ip} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22}) ; then echo -e "${ssh_output}" >> ${tmpfile}.running else echo -e "${idsST[Bold]}${idsCL[Red]} ${host} - Timeout${idsCL[Default]}${idsST[Reset]}" >> ${tmpfile}.running fi - mv ${tmpfile}.running ${tmpfile}.done + mv ${tmpfile}.running ${tmpfile}.done > /dev/null 2>&1 } UPDATENODES(){