basics.yml aktualisiert
This commit is contained in:
parent
d6052f565a
commit
971c8f2580
17
basics.yml
17
basics.yml
@ -738,14 +738,6 @@
|
|||||||
done
|
done
|
||||||
|
|
||||||
message="$(cat)"
|
message="$(cat)"
|
||||||
|
|
||||||
# If message should be sent by another host
|
|
||||||
if [ -n "$tohost" ]
|
|
||||||
then
|
|
||||||
cat | ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
[ "$message" = "''" ] && exit 0
|
[ "$message" = "''" ] && exit 0
|
||||||
[ -z "$message" ] && exit 0
|
[ -z "$message" ] && exit 0
|
||||||
|
|
||||||
@ -753,7 +745,12 @@
|
|||||||
then
|
then
|
||||||
message=$(echo -e "$subj\n$message")
|
message=$(echo -e "$subj\n$message")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If message should be sent by another host
|
||||||
|
if [ -n "$tohost" ]
|
||||||
|
then
|
||||||
|
echo "$message" | ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new -p33 $tohost " $@"
|
||||||
|
fi
|
||||||
|
|
||||||
## SSH
|
## SSH
|
||||||
if [ -n "$SSH_ORIGINAL_COMMAND" ]
|
if [ -n "$SSH_ORIGINAL_COMMAND" ]
|
||||||
@ -773,7 +770,7 @@
|
|||||||
## MATRIX
|
## MATRIX
|
||||||
room=$(hostname)
|
room=$(hostname)
|
||||||
[ -n "$togroup" ] && room=$togroup
|
[ -n "$togroup" ] && room=$togroup
|
||||||
if ps ax | grep -q synapse.app.homeserver
|
if ps ax | grep -v grep | grep -q synapse.app.homeserver
|
||||||
then
|
then
|
||||||
sudo /usr/bin/docker compose -f /home/docker/matrix.$(hostname)/docker-compose.yml run -T matrix.$(hostname)--commander -m "$message" -k --room $room --log-level WARNING WARNING
|
sudo /usr/bin/docker compose -f /home/docker/matrix.$(hostname)/docker-compose.yml run -T matrix.$(hostname)--commander -m "$message" -k --room $room --log-level WARNING WARNING
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user