From 95c0693bc586b331c4d140b9e85872159bc02988 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sat, 5 Sep 2020 19:27:02 -0500 Subject: Moved oragono socket to more persistent location. --- oragono/files/oragono.service | 20 ++++++++++++++++++++ oragono/tasks/main.yaml | 5 ++--- oragono/templates/nginx.conf.j2 | 2 +- oragono/templates/oragono.service.j2 | 20 -------------------- oragono/templates/oragono.yaml.j2 | 2 +- 5 files changed, 24 insertions(+), 25 deletions(-) create mode 100644 oragono/files/oragono.service delete mode 100644 oragono/templates/oragono.service.j2 (limited to 'oragono') diff --git a/oragono/files/oragono.service b/oragono/files/oragono.service new file mode 100644 index 0000000..f751ec0 --- /dev/null +++ b/oragono/files/oragono.service @@ -0,0 +1,20 @@ +[Unit] +Description=oragono +After=network.target +# If you are using MySQL for history storage, comment out the above line +# and uncomment these two instead (you must independently install and configure +# MySQL for your system): +# Wants=mysql.service +# After=network.target mysql.service + +[Service] +Type=simple +User=oragono +WorkingDirectory=/var/oragono +ExecStart=/usr/local/bin/oragono run --conf /etc/oragono/oragono.yaml +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure +LimitNOFILE=1048576 + +[Install] +WantedBy=multi-user.target diff --git a/oragono/tasks/main.yaml b/oragono/tasks/main.yaml index 1a06173..f2c982d 100644 --- a/oragono/tasks/main.yaml +++ b/oragono/tasks/main.yaml @@ -34,7 +34,6 @@ loop: - "/etc" - "/var" - - "/run" - name: configure oragono become: yes @@ -55,8 +54,8 @@ - name: install oragono service become: yes - template: - src: "oragono.service.j2" + copy: + src: "oragono.service" dest: "/lib/systemd/system/oragono.service" mode: "0644" notify: restart oragono diff --git a/oragono/templates/nginx.conf.j2 b/oragono/templates/nginx.conf.j2 index 31089c8..2cedd56 100644 --- a/oragono/templates/nginx.conf.j2 +++ b/oragono/templates/nginx.conf.j2 @@ -1,6 +1,6 @@ server { listen 6697 ssl; - proxy_pass unix:/run/oragono/socket; + proxy_pass unix:/var/oragono/oragono.socket; proxy_protocol on; ssl_certificate {{nginx_ssl_cert}}; diff --git a/oragono/templates/oragono.service.j2 b/oragono/templates/oragono.service.j2 deleted file mode 100644 index f751ec0..0000000 --- a/oragono/templates/oragono.service.j2 +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=oragono -After=network.target -# If you are using MySQL for history storage, comment out the above line -# and uncomment these two instead (you must independently install and configure -# MySQL for your system): -# Wants=mysql.service -# After=network.target mysql.service - -[Service] -Type=simple -User=oragono -WorkingDirectory=/var/oragono -ExecStart=/usr/local/bin/oragono run --conf /etc/oragono/oragono.yaml -ExecReload=/bin/kill -HUP $MAINPID -Restart=on-failure -LimitNOFILE=1048576 - -[Install] -WantedBy=multi-user.target diff --git a/oragono/templates/oragono.yaml.j2 b/oragono/templates/oragono.yaml.j2 index 5344683..3619c6a 100644 --- a/oragono/templates/oragono.yaml.j2 +++ b/oragono/templates/oragono.yaml.j2 @@ -58,7 +58,7 @@ server: # proxy: false # Example of a Unix domain socket for proxying: - "/run/oragono/socket": + "/var/oragono/oragono.socket": # Example of a Tor listener: any connection that comes in on this listener will # be considered a Tor connection. It is strongly recommended that this listener -- cgit v1.2.3