diff --git a/dsmon.sh b/dsmon.sh index e964906..a93a9c8 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -272,7 +272,7 @@ RUNCMD(){ for hostid in "${!host_ip[@]}"; do echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - Running command: ${1}${idsCL[Default]}${idsST[Reset]}" - ssh root@${host_ip[$hostid]} ${1} + ssh root@${host_ip[$hostid]} "${1}" done } @@ -280,7 +280,7 @@ case $action in check) CHECK ${2};; setupssh) SETUPSSH;; run) RUN ${2};; - runcmd) RUNCMD ${2};; + runcmd) RUNCMD "${2}";; update);; *) RUN ${action};; esac