PDUdaemon service, conf, and script
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 29 Oct 2018 15:58:23 +0000 (11:58 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 29 Oct 2018 15:58:23 +0000 (11:58 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
lava/pdudaemon/daemon.sh [new file with mode: 0644]
lava/pdudaemon/pdudaemon.conf [new file with mode: 0644]
lava/pdudaemon/pdudaemon.service [new file with mode: 0644]

diff --git a/lava/pdudaemon/daemon.sh b/lava/pdudaemon/daemon.sh
new file mode 100644 (file)
index 0000000..2a83c2e
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+WORK_DIR="$(dirname "$(readlink -f "$0")")"
+VENV="${WORK_DIR}/venv/bin/activate"
+
+source "${VENV}"
+
+pdudaemon --journal --dbfile="${WORK_DIR}/pdudaemon.db" --conf="${WORK_DIR}/pdudaemon.conf"
diff --git a/lava/pdudaemon/pdudaemon.conf b/lava/pdudaemon/pdudaemon.conf
new file mode 100644 (file)
index 0000000..aaea8df
--- /dev/null
@@ -0,0 +1,18 @@
+{
+    "daemon": {
+        "hostname": "0.0.0.0",
+        "port": 16421,
+        "dbname": "pdudaemon",
+        "logging_level": "DEBUG"
+    },
+    "pdus": {
+        "pdu01.internal.efficios.com": {
+            "driver": "apc7932",
+            "username": "lava",
+            "password": "lava"
+        },
+        "carrier-armhf.internal.efficios.com": {
+            "driver": "consoleserver"
+        }
+    }
+}
diff --git a/lava/pdudaemon/pdudaemon.service b/lava/pdudaemon/pdudaemon.service
new file mode 100644 (file)
index 0000000..0a4531d
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Control and Queueing daemon for PDUs
+
+[Service]
+ExecStart=/bin/bash /home/lava/pdudaemon_service/daemon.sh
+Type=simple
+User=lava
+Restart=on-abnormal
+
+[Install]
+WantedBy=multi-user.target
This page took 0.024941 seconds and 4 git commands to generate.