Update dsmon.sh

This commit is contained in:
2024-01-26 10:10:53 -06:00
parent 6e1ac1e899
commit 7beae2690f

View File

@@ -353,13 +353,13 @@ RUNCMD(){
nc_count=0; completed=false
until [ "${completed}" == "true" ]; do
for nodecmd in /tmp/.dsmon.runcmd.*.done; do
HOST=$(grep -oP '(?<=runcmd.).*?(?=.done)' <<< "${nodecmd}")
if [ "${HOST}" != "*" ]; then
if [[ "${nodecmd}" != *"*"* ]]; then
nodecmd_output=$(cat ${nodecmd})
[ "${nodecmd_output}" != "" ] && echo -e "${nodecmd_output}\n"
fi
rm -f ${nodecmd}
# HOST=$(grep -oP '(?<=runcmd.).*?(?=.done)' <<< "${nodecmd}")
# if [ "${HOST}" != "*" ]; then
# if [[ "${nodecmd}" != *"*"* ]]; then
# nodecmd_output=$(cat ${nodecmd})
# [ "${nodecmd_output}" != "" ] && echo -e "${nodecmd_output}\n"
# fi
# rm -f ${nodecmd}
if [[ "${nodecmd}" != *"*"* ]]; then
nodecmd_output=$(cat ${nodecmd})