Files
saf7/saf7_SendMsg.sh

19 lines
399 B
Bash
Raw Normal View History

2018-04-14 21:39:55 +02:00
#/bin/sh
if [ $# -lt 2 ];then
echo "Arg 1 : full jid without resource."
echo "Arg 2 : message."
echo "Arg 3 : bus name tag. Optional. Default = default ."
exit 0
fi
RECIPIENT="$1"
MSG="$2"
TAG="default"
[ -n "$3" ] && TAG="$3"
dbus-send --system --print-reply=literal --type=method_call --dest=xmpp.saf-"$TAG" /xmpp/saf xmpp.saf.SendMsg string:"$RECIPIENT" string:"$MSG"
exit 0