Page MenuHomeDevCentral

D864.id2198.diff
No OneTemporary

D864.id2198.diff

diff --git a/roles/shellserver/odderon/files/odderon.service b/roles/shellserver/odderon/files/odderon.service
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/odderon/files/odderon.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Odderon darkbot
+
+[Service]
+User=odderon
+
+Type=Simple
+ExecStart=/opt/odderon/bin/darkbot
+ExecReload= kill -HUP `cat /opt/odderon/darkbot.pid`
+PIDFile=/opt/odderon/darkbot.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/roles/shellserver/odderon/init.sls b/roles/shellserver/odderon/init.sls
--- a/roles/shellserver/odderon/init.sls
+++ b/roles/shellserver/odderon/init.sls
@@ -9,3 +9,4 @@
include:
- .account
- .code
+ - .service
diff --git a/roles/shellserver/odderon/service.sls b/roles/shellserver/odderon/service.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/odderon/service.sls
@@ -0,0 +1,28 @@
+# -------------------------------------------------------------
+# Salt — Deploy Odderon unit (darkbot)
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-01-25
+# Description: Darkbot unit (Freenode)
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Unit configuration
+# -------------------------------------------------------------
+
+odderon_unit:
+ file.managed:
+ - name: /etc/systemd/system/odderon.service
+ - source: salt://roles/shellserver/odderon/files/odderon.service
+ - mode: 0644
+ module.run:
+ - name: service.systemctl_reload
+ - onchanges:
+ - file: odderon
+
+odderon_running:
+ service.running:
+ - name: Odderon darkbot
+ - watch:
+ - module: odderon

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 17:45 (20 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247872
Default Alt Text
D864.id2198.diff (1 KB)

Event Timeline