1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

updated scripts

This commit is contained in:
postmannen 2023-01-10 06:56:01 +01:00
parent 541f243067
commit e1771e9800
2 changed files with 5 additions and 13 deletions

View file

@ -13,10 +13,6 @@ if [ -z "$3" ]; then
exit 1
fi
echo $1
echo $2
echo $3
nodes=$1
shell=$2
command=$3
@ -24,7 +20,7 @@ command=$3
IFS=',' read -r -a array <<<"$nodes"
function sendMessage() {
cat >msg.yaml <<EOF
cat >msg-"$element".yaml <<EOF
[
{
"toNodes": ["${element}"],
@ -53,5 +49,5 @@ EOF
for element in "${array[@]}"; do
sendMessage element "$command"
cp msg.yaml ./readfolder
cp msg-"$element".yaml ./readfolder
done

View file

@ -13,10 +13,6 @@ if [ -z "$3" ]; then
exit 1
fi
echo $1
echo $2
echo $3
nodes=$1
shell=$2
command=$3
@ -24,7 +20,7 @@ command=$3
IFS=',' read -r -a array <<<"$nodes"
function sendMessage() {
cat >msg.yaml <<EOF
cat >msg-"$element".yaml <<EOF
[
{
"toNodes": ["${element}"],
@ -52,6 +48,6 @@ EOF
}
for element in "${array[@]}"; do
sendMessage element command
nc -U ./tmp/steward.sock <msg.yaml
sendMessage element "$command"
nc -U ./tmp/steward.sock <msg-"$element".yaml
done