basics.yml aktualisiert
This commit is contained in:
parent
2cb8bbc874
commit
9e1f867f8c
19
basics.yml
19
basics.yml
@ -737,21 +737,14 @@
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
message="$(cat)"
|
||||||
|
|
||||||
# If message should be sent by another host
|
# If message should be sent by another host
|
||||||
if [ -n "$tohost" ]
|
if [ -n "$tohost" ]
|
||||||
then
|
then
|
||||||
if getent passwd signal >/dev/null
|
cat | ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $@"
|
||||||
then
|
|
||||||
cat | sudo -u signal ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $@"
|
|
||||||
else
|
|
||||||
cat | ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $@"
|
|
||||||
fi
|
|
||||||
exit $?
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
message="$(cat)"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[ "$message" = "''" ] && exit 0
|
[ "$message" = "''" ] && exit 0
|
||||||
[ -z "$message" ] && exit 0
|
[ -z "$message" ] && exit 0
|
||||||
@ -778,9 +771,11 @@
|
|||||||
|
|
||||||
|
|
||||||
## MATRIX
|
## MATRIX
|
||||||
|
room=$(hostname)
|
||||||
|
[ -n "$togroup" ] && room=$togroup
|
||||||
if [ -f /home/docker/matrix.$(hostname)/matrix-commander-data/credentials.json ]
|
if [ -f /home/docker/matrix.$(hostname)/matrix-commander-data/credentials.json ]
|
||||||
then
|
then
|
||||||
docker compose -f /home/docker/matrix.$(hostname)/docker-compose.yml run -T matrix.$(hostname)--commander -m "$message" --log-level WARNING WARNING
|
docker compose -f /home/docker/matrix.$(hostname)/docker-compose.yml run -T matrix.$(hostname)--commander -k -m "$message" --room $room --log-level WARNING WARNING
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user