added launch script, config an systemd unit file.
This commit is contained in:
15
usr/local/bin/fanctrl
Executable file
15
usr/local/bin/fanctrl
Executable file
@@ -0,0 +1,15 @@
|
||||
#! /bin/bash
|
||||
|
||||
cleanup() {
|
||||
echo "cleanup()"
|
||||
echo "terminating ${FANCTRL_PID}"
|
||||
kill -TERM "${FANCTRL_PID}"
|
||||
}
|
||||
|
||||
trap cleanup exit
|
||||
|
||||
cd /home/pi/git/fanctrl
|
||||
exec /home/pi/.local/bin/uv run ./fanctrl.py &
|
||||
FANCTRL_PID=$!
|
||||
echo "FANCTRL_PID=${FANCTRL_PID}"
|
||||
wait "${FANCTRL_PID}"
|
||||
Reference in New Issue
Block a user