Page MenuHomeDevCentral

D864.id2201.diff
No OneTemporary

D864.id2201.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,29 @@
+# -------------------------------------------------------------
+# 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.force_reload
+ - m_name: odderon
+ - onchanges:
+ - file: odderon_unit
+
+odderon_running:
+ service.running:
+ - name: odderon
+ - watch:
+ - module: odderon_unit

File Metadata

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

Event Timeline