Page MenuHomeDevCentral

D1528.id3905.diff
No OneTemporary

D1528.id3905.diff

diff --git a/roles/shellserver/quassel-core/files/quassel.service b/roles/shellserver/quassel-core/files/quassel.service
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/quassel-core/files/quassel.service
@@ -0,0 +1,30 @@
+# -------------------------------------------------------------
+# Odderon
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2018-03-28
+# License: Trivial work, not eligible to copyright
+# Source: Arch quassel package
+# Source file: roles/shellserver/quassel-core/files/quassel.service
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+[Unit]
+Description=Quassel Core
+After=network.target postgresql.service
+Wants=postgresql.service
+
+[Service]
+User=quassel
+Group=quassel
+PIDFile=/var/run/quassel.pid
+EnvironmentFile=/etc/quassel
+ExecStart=/usr/bin/quasselcore --configdir=/var/lib/quassel
+
+[Install]
+WantedBy=multi-user.target
diff --git a/roles/shellserver/quassel-core/init.sls b/roles/shellserver/quassel-core/init.sls
--- a/roles/shellserver/quassel-core/init.sls
+++ b/roles/shellserver/quassel-core/init.sls
@@ -10,3 +10,4 @@
- .account
- .certificate
- .software
+ - .service
diff --git a/roles/shellserver/quassel-core/service.sls b/roles/shellserver/quassel-core/service.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/quassel-core/service.sls
@@ -0,0 +1,35 @@
+# -------------------------------------------------------------
+# Salt — Provision Quassel core
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2018-03-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import services with context %}
+
+# -------------------------------------------------------------
+# Unit configuration
+# -------------------------------------------------------------
+
+{% if services['manager'] == 'systemd' %}
+
+quassel_unit:
+ file.managed:
+ - name: /etc/systemd/system/quassel.service
+ - source: salt://roles/shellserver/quassel-core/files/quassel.service
+ - mode: 0644
+ module.run:
+ - name: service.force_reload
+ - m_name: quassel
+ - onchanges:
+ - file: quassel_unit
+
+quassel_running:
+ service.running:
+ - name: quassel
+ - enable: true
+ - watch:
+ - module: quassel_unit
+
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 16:20 (2 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260450
Default Alt Text
D1528.id3905.diff (2 KB)

Event Timeline