add bridge daemon

matrix
histausse 3 years ago
parent 673e6c9d04
commit 4557020321
Signed by: histausse
GPG Key ID: 67486F107F62E9E9

@ -3,3 +3,8 @@
shell:
cmd: npm run build
chdir: /srv/matrix-appservice-discord
- name: Restart the discord bridge
systemd:
name: bridge_discord
state: restarted

@ -51,6 +51,7 @@
cmd: npm run build
chdir: /srv/matrix-appservice-discord
creates: /srv/matrix-appservice-discord/build
notify: Restart the discord bridge
- name: Configure the bridge
template:
@ -59,6 +60,7 @@
owner: root
group: root
mode: '0660'
notify: Restart the discord bridge
- name: Generate discord-registration.yaml
shell:
@ -72,3 +74,15 @@
src: /srv/matrix-appservice-discord/discord-registration.yaml
dest: /etc/matrix-synapse/discord-registration.yaml
state: link
- name: Copy the daemon configuration
template:
src: bridge_discord.service
dest: /etc/systemd/system/bridge_discord.service
notify: Restart the discord bridge
- name: Enable the daemon
systemd:
name: bridge_discord
state: started
enabled: yes

@ -0,0 +1,15 @@
{{ ansible_managed | comment }}
[Unit]
Description = Discord Bridge
[Service]
Environment=NODE_PORT=3000
Type=simple
User=root
Restart=on-failure
WorkingDirectory=/srv/matrix-appservice-discord
ExecStart=npm start
[Install]
WantedBy=multi-user.target

@ -1,6 +1,4 @@
# This is a sample of the config file showing all available options.
# Where possible we have documented what they do, and all values are the
# default values.
{{ ansible_managed | comment }}
bridge:
# Domain part of the bridge, e.g. matrix.org

Loading…
Cancel
Save