From f33b38e1360db31485aff0a67cc3c2a59e9e37e4 Mon Sep 17 00:00:00 2001 From: postmannen Date: Fri, 6 Jan 2023 08:18:20 +0100 Subject: [PATCH] Added shell script for sending clicommand messages --- scripts/cmd.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 scripts/cmd.sh diff --git a/scripts/cmd.sh b/scripts/cmd.sh new file mode 100755 index 0000000..03c0860 --- /dev/null +++ b/scripts/cmd.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "No toNode supplied" + exit 1 +fi +if [ -z "$2" ]; then + echo "No cmd supplied" + exit 1 +fi + +command=$2 + +IFS=',' read -r -a array <<<"$1" + +function sendMessage() { + cat >msg.yaml <