aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kutter-mcu.service
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2025-08-15 21:13:44 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2025-08-15 21:46:37 +0100
commitae9102482560b557628c83a247ab35063ade0bf7 (patch)
tree2f08afac5a943aac31186e2c5c0c7d60e6d8837a /scripts/kutter-mcu.service
parent121edea90cde8295f720ed9d2f2fccca61f66bb4 (diff)
downloadkutter-ae9102482560b557628c83a247ab35063ade0bf7.tar.gz
kutter-ae9102482560b557628c83a247ab35063ade0bf7.tar.xz
kutter-ae9102482560b557628c83a247ab35063ade0bf7.zip
Rename everything significant to Kutter except for docs
Diffstat (limited to 'scripts/kutter-mcu.service')
-rw-r--r--scripts/kutter-mcu.service21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/kutter-mcu.service b/scripts/kutter-mcu.service
new file mode 100644
index 00000000..99895a37
--- /dev/null
+++ b/scripts/kutter-mcu.service
@@ -0,0 +1,21 @@
+#Systemd kutter linux mcu Service
+
+[Unit]
+Description=Starts the MCU Linux firmware for kutter on startup
+Documentation=https://the-tk.com/cgit/kutter/tree/docs/RPi_microcontroller.md
+Before=kutter.service
+ConditionFileIsExecutable=/usr/local/bin/kutter_mcu
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+Environment=KUTTER_HOST_MCU_SERIAL=/tmp/kutter_host_mcu
+RemainAfterExit=yes
+ExecStart=/usr/local/bin/kutter_mcu -r -I ${KUTTER_HOST_MCU_SERIAL}
+ExecStop=sh -c 'echo "FORCE_SHUTDOWN" > ${KUTTER_HOST_MCU_SERIAL}'
+ExecStop=sleep 1
+TimeoutStopSec=2
+Restart=always
+RestartSec=5