-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Install this file as /etc/systemd/system/[email protected]
# Don't forget to run: sudo systemctl --system daemon-reload
# Requires /etc/udev/rules.d/89delcom_clock.rules as well.
# Delcom Engineering, USB Numeric Display
# Stuart Pook http://www.pook.it/
# https://github.com/stuart12/delcom-clock
[Unit]
Description=Show time and date on Delcom 7 segment LED display
[Service]
WorkingDirectory=/
Environment=HOME=%t/%p
RuntimeDirectory=%p
RuntimeDirectoryMode=0755
ExecStartPre=+/bin/sh -xc 'f="../power/level powered mode_msb mode_lsb textmode text decimals"; cd /sys/bus/usb/drivers/usbsevseg/%i && chgrp delcom $$f && chmod 664 $$f'
ExecStartPre=/usr/bin/pip3 install paho-mqtt
ExecStart=/opt/github.com/stuart12/delcom-clock/delcom-clock -v --mode 660 --control %t/%p/led-bedroom --update 60 --pformat "{:3.1f} {:02d}.{:02d}" --parg mqtt:home/bedroom/temperature --parg time:hour --parg time:min %i
User=delcom
Group=homeassistant
SupplementaryGroups=delcom
DevicePolicy=closed
ProtectSystem=full
ProtectHome=true
ProtectKernelTunables=false
ProtectControlGroups=true
CapabilityBoundingSet=
NoNewPrivileges=true
SystemCallFilter=~@resources @privileged @obsolete @mount @clock @cpu-emulation @debug @keyring @module @raw-io
ProtectKernelModules=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
SystemCallArchitectures=native
RestrictNamespaces=true
TimeoutStopSec=2s