This commit is contained in:
olli 2024-08-18 17:07:13 +02:00
parent cbcbf28eec
commit 28e9f2c3df

View File

@ -740,6 +740,7 @@
done
message="$(cat)"
orig_message="$message"
[ "$message" = "''" ] && exit 0
[ -z "$message" ] && exit 0
@ -774,14 +775,17 @@
[ -n "$togroup" ] && room=$togroup
if ps ax | grep -v grep | grep -q synapse.app.homeserver
then
if [ -p /usr/local/share/$(hostname).fifo ]
if [ -p "/usr/local/share/$(hostname).fifo" ]
then
echo "$message" >/usr/local/share/$(hostname).fifo
matrix_message=$(echo "${subj}<br>${orig_message}")
matrix_target="/usr/local/share/$(hostname).fifo"
[ -n "$togroup" ] && [ -p "/usr/local/share/$(hostname)-${togroup}.fifo" ] && target="/usr/local/share/$(hostname)-${togroup}.fifo"
echo "$matrix_message" >"$target"
else
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
## SIGNAL
if [ -f /home/signal/.local/share/signal-cli/data/accounts.json ]