update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS=2.3.40-03282025
|
VERS=2.3.42-03282025
|
||||||
|
|
||||||
DS_FOLDER=/opt/idssys/dsmon
|
DS_FOLDER=/opt/idssys/dsmon
|
||||||
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs
|
DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs
|
||||||
|
|||||||
4
dsmon.sh
4
dsmon.sh
@@ -393,12 +393,12 @@ RUNCMD_SUB(){
|
|||||||
touch ${tmpfile}.running > /dev/null 2>&1
|
touch ${tmpfile}.running > /dev/null 2>&1
|
||||||
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host}${idsCL[Default]}${idsST[Reset]}" >> ${tmpfile}.running
|
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host}${idsCL[Default]}${idsST[Reset]}" >> ${tmpfile}.running
|
||||||
if ssh_output=$(ssh -tq -o ConnectTimeout=5 -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} 2>&1) ; then
|
if ssh_output=$(ssh -tq -o ConnectTimeout=5 -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} 2>&1) ; then
|
||||||
echo -e "COMMAND SUCCESS: ${ssh_output}" >> ${tmpfile}.running
|
echo -e "${idsCL[LightGreen]}SUCCESS: ${ssh_output}${idsCL[Default]}" >> ${tmpfile}.running
|
||||||
else
|
else
|
||||||
if [ "${ssh_output}" == "" ]; then
|
if [ "${ssh_output}" == "" ]; then
|
||||||
echo -e "${idsCL[Red]} ${host} [${ip}] - Timeout${idsCL[Default]}" >> ${tmpfile}.running
|
echo -e "${idsCL[Red]} ${host} [${ip}] - Timeout${idsCL[Default]}" >> ${tmpfile}.running
|
||||||
else
|
else
|
||||||
echo -e "${ssh_output}" >> ${tmpfile}.running
|
echo -e "${idsCL[LightYellow]}${ssh_output}${idsCL[Default]}" >> ${tmpfile}.running
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
mv ${tmpfile}.running ${tmpfile}.done > /dev/null 2>&1
|
mv ${tmpfile}.running ${tmpfile}.done > /dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user