From 5083b918716ac19bb38ce3e0db5e640977862054 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 22 May 2022 14:12:32 -0500 Subject: [PATCH] Install mqttdpms The `mqttdpms` tool will allow the screens to be turned off and on using Home Assistant. We'll install it into the rootfs image by copying the artifact from its Jenkins build into the overlay tree before building the image. --- ci/Jenkinsfile | 5 +++++ overlay/etc/systemd/user/mqttdpms.service | 9 +++++++++ overlay/home/user/.config/mqttdpms/config.toml | 1 + overlay/home/user/.xinitrc | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 overlay/etc/systemd/user/mqttdpms.service create mode 120000 overlay/home/user/.config/mqttdpms/config.toml diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 4ee4e72..d9db9cd 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -39,6 +39,11 @@ pipeline { sh 'rm -rf _build' } } + copyArtifacts \ + filter: 'aarch64/mqttdpms', + projectName: 'mqttdpms/master', + selector: lastSuccessful() + sh 'install aarch64/mqttdpms overlay/usr/local/bin/' sh 'make rootfs initramfs' } } diff --git a/overlay/etc/systemd/user/mqttdpms.service b/overlay/etc/systemd/user/mqttdpms.service new file mode 100644 index 0000000..971642c --- /dev/null +++ b/overlay/etc/systemd/user/mqttdpms.service @@ -0,0 +1,9 @@ +[Unit] +Description=MQTT DPMS Control + +[Service] +ExecStart=/usr/local/bin/mqttdpms +Environment=RUST_LOG=info +Restart=always +StandardInput=null +StandardOutput=journal diff --git a/overlay/home/user/.config/mqttdpms/config.toml b/overlay/home/user/.config/mqttdpms/config.toml new file mode 120000 index 0000000..a0f95ec --- /dev/null +++ b/overlay/home/user/.config/mqttdpms/config.toml @@ -0,0 +1 @@ +/run/storage/mqttdpms.toml \ No newline at end of file diff --git a/overlay/home/user/.xinitrc b/overlay/home/user/.xinitrc index a423cce..7142a7b 100644 --- a/overlay/home/user/.xinitrc +++ b/overlay/home/user/.xinitrc @@ -7,6 +7,6 @@ TZ="$(curl https://ipapi.co/timezone)" export TZ systemctl --user import-environment DISPLAY TZ -systemctl --user start firefox-marionette.socket firefox +systemctl --user start firefox-marionette.socket firefox mqttdpms exec openbox-session