diff --git a/basics.yml b/basics.yml index f6db65c..209e73c 100644 --- a/basics.yml +++ b/basics.yml @@ -745,6 +745,7 @@ # If message should be sent by another host if [ -n "$tohost" ] then + [[ $@ =~ -g ]] || group="-g $togroup" [ -z "$togroup" ] && group="-g $(hostname)" echo "$message" | ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $(printf ' %q' "$@ $group")" fi