default matrix message pipe

This commit is contained in:
olli 2024-08-18 16:30:58 +02:00
parent 3978e8c71b
commit 601f89bcbf

View File

@ -88,6 +88,12 @@
backup: yes
notify: Restart matrix
- name: Create Matrix Group
ansible.builtin.group:
name: matrix
state: present
gid: 1007
- name: /home/docker/matrix.{{inventory_hostname}}/genpw.sh (generate Random PW for Matrix and DB)
blockinfile:
path: /home/docker/matrix.{{inventory_hostname}}/genpw.sh
@ -140,6 +146,11 @@
cp_max: 10
" >>data/homeserver.yaml
fi
# fifo pipe for messages to default room
mkfifo /usr/local/share/$(hostname).fifo
chgrp matrix /usr/local/share/$(hostname).fifo
chmod 660 matrix /usr/local/share/$(hostname).fifo
backup: yes
validate: /bin/bash -n %s
notify: run genpw.sh
@ -428,6 +439,14 @@
- ./matrix-commander-data:/data:rw
restart: no
matrix.defiant.dedyn.io--commander-pipe:
image: matrixcommander/matrix-commander
volumes:
- /etc/localtime:/etc/localtime:ro
- ./matrix-commander-data:/data:rw
- /usr/local/share/{{inventory_hostname}}.fifo:/{{inventory_hostname}}.fifo
entrypoint: /bin/bash -c 'cd /data && tail -F /{{inventory_hostname}}.fifo | /app/matrix_commander/matrix-commander --html -m _ -k --room {{inventory_hostname}} --log-level INFO INFO'
restart: unless-stopped
networks:
matrix.{{inventory_hostname}}--network:
@ -461,7 +480,7 @@
block: |
# matrix
sleep 120
cd /home/docker/matrix.{{inventory_hostname}} || exit 1
cd /home/docker/matrix.{{inventory_hostname}} || exit 1
. ./env
. ./env.user
date >>matrix.init.log