Added Dendrite symlink to port workaround.
--- a/dendrite/server/handlers/main.yaml Mon Aug 08 16:12:44 2022 -0500
+++ b/dendrite/server/handlers/main.yaml Mon Aug 08 21:16:41 2022 -0500
@@ -2,4 +2,4 @@
- name: restart service
become: yes
- systemd: name="dendrite@{{dendrite_instance}}.service" state="restarted" daemon_reload="yes"
+ systemd: name="dendrite@{{dendrite_port}}.service" state="restarted" daemon_reload="yes"
--- a/dendrite/server/tasks/main.yaml Mon Aug 08 16:12:44 2022 -0500
+++ b/dendrite/server/tasks/main.yaml Mon Aug 08 21:16:41 2022 -0500
@@ -50,7 +50,6 @@
- {"src": "dendrite-upgrade-tests" , "dest": "dendrite-upgrade-tests"}
- {"src": "generate-config" , "dest": "dendrite-generate-config"}
- {"src": "generate-keys" , "dest": "dendrite-generate-keys"}
- - {"src": "goose" , "dest": "dendrite-goose"}
- {"src": "resolve-state" , "dest": "dendrite-resolve-state"}
- name: create instance dir
@@ -66,6 +65,17 @@
- "{{dendrite_dir}}"
- "{{dendrite_dir}}/{{dendrite_instance}}"
+- name: create instance port symlink
+ become: yes
+ file:
+ src: "{{dendrite_dir}}/{{dendrite_instance}}"
+ dest: "{{dendrite_dir}}/{{dendrite_port}}"
+ state: "link"
+ owner: "{{dendrite_user}}"
+ group: "{{dendrite_user}}"
+ mode: "0755"
+ notify: restart service
+
- name: install keys
become: yes
copy:
@@ -107,6 +117,10 @@
src: "[email protected]"
dest: "/lib/systemd/system/[email protected]"
+- name: ensure instance service is stopped
+ become: yes
+ systemd: name="dendrite@{{dendrite_instance}}.service" enabled="no" state="stopped" daemon_reload="yes"
+
- name: ensure service is started
become: yes
- systemd: name="dendrite@{{dendrite_instance}}.service" enabled="yes" state="started"
+ systemd: name="dendrite@{{dendrite_port}}.service" enabled="yes" state="started"
--- a/dendrite/server/templates/[email protected] Mon Aug 08 16:12:44 2022 -0500
+++ b/dendrite/server/templates/[email protected] Mon Aug 08 21:16:41 2022 -0500
@@ -1,10 +1,10 @@
[Unit]
-Description=Dendrite %I Instance
+Description=Dendrite instance on port %i
After=syslog.target network.target postgresql.service
[Service]
WorkingDirectory={{dendrite_dir}}/%i/
-ExecStart=/usr/local/bin/dendrite-monolith-server -config "{{dendrite_dir}}/%i/dendrite.yaml" -http-bind-address ":{{dendrite_port}}"
+ExecStart=/usr/local/bin/dendrite-monolith-server -config "{{dendrite_dir}}/%i/dendrite.yaml" -http-bind-address ":%i"
Restart=always
User={{dendrite_user}}
LimitNOFILE=65535