local-looper: Utilise service watchdog.

This commit is contained in:
David Sutton 2023-04-04 14:42:36 +09:30
parent 6b8b72ccfd
commit dafb51d34e
3 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# DESCRIPTION
local looper is a process which will continually loop a pcm audio file
(like looper). The intended hardware for this system is a raspberry pi
(like looper: "av/cmd/looper/"). The intended hardware for this system is a raspberry pi
zero W, with a USB sound card (AUDIODEV=hw:(1,0)).
# AUTHORS

View File

@ -7,5 +7,9 @@ User=pi
WorkingDirectory=/home/pi/
ExecStart=/bin/bash /home/pi/looper.sh
Type=notify
WatchdogSec=70s
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +1,9 @@
#!/bin/bash
systemd-notify --ready
export AUDIODEV=hw:1,0
while true; do
play -q -V0 -t raw -r 44.1k -e signed -b 16 -c 1 /home/pi/shrimp.pcm
systemd-notify --status="service is running" WATCHDOG=1
done