Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3746070
D864.id2197.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D864.id2197.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D864: Create Odderon systemd unit
Attached
Detach File
Event Timeline
Log In to Comment