Page MenuHomeDevCentral

D864.id2197.diff
No OneTemporary

D864.id2197.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=Darkbot unit
+
+[Service]
+User=odderon
+
+Type=Simple
+ExecStart=/opt/darkbot/build/darkbot
+ExecReload= kill -HUP `cat /opt/darkbot/darkbot.pid`
+PIDFile=/opt/darkbot/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, 18:25 (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247926
Default Alt Text
D864.id2197.diff (1 KB)

Event Timeline