aboutsummaryrefslogtreecommitdiff
path: root/therm.openrc
diff options
context:
space:
mode:
Diffstat (limited to 'therm.openrc')
-rwxr-xr-xtherm.openrc19
1 files changed, 19 insertions, 0 deletions
diff --git a/therm.openrc b/therm.openrc
new file mode 100755
index 0000000..7aa3d36
--- /dev/null
+++ b/therm.openrc
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+thisdir="$(dirname "$(readlink -f "$1")")"
+
+description="XIAOMI Mijia prometheus exporter"
+directory="$thisdir"
+command="/usr/bin/env VIRTUAL_ENV='${thisdir}/venv' PATH='${thisdir}/venv/bin:/bin:/usr/bin' ./scan.py"
+pidfile="${thisdir}/ats-therm.pid"
+command_background=true
+command_user=dakkar
+output_log="${thisdir}/scan.out"
+error_log="${thisdir}/scan.err"
+name="ats-therm"
+procname="python"
+
+depend() {
+ need localmount net
+ after bootmisc
+}