mirror of https://bitbucket.org/ausocean/av.git
local-looper: Utilise service watchdog.
This commit is contained in:
parent
6b8b72ccfd
commit
dafb51d34e
|
@ -1,6 +1,6 @@
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
local looper is a process which will continually loop a pcm audio file
|
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)).
|
zero W, with a USB sound card (AUDIODEV=hw:(1,0)).
|
||||||
|
|
||||||
# AUTHORS
|
# AUTHORS
|
||||||
|
|
|
@ -7,5 +7,9 @@ User=pi
|
||||||
WorkingDirectory=/home/pi/
|
WorkingDirectory=/home/pi/
|
||||||
ExecStart=/bin/bash /home/pi/looper.sh
|
ExecStart=/bin/bash /home/pi/looper.sh
|
||||||
|
|
||||||
|
Type=notify
|
||||||
|
WatchdogSec=70s
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
systemd-notify --ready
|
||||||
|
|
||||||
export AUDIODEV=hw:1,0
|
export AUDIODEV=hw:1,0
|
||||||
while true; do
|
while true; do
|
||||||
play -q -V0 -t raw -r 44.1k -e signed -b 16 -c 1 /home/pi/shrimp.pcm
|
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
|
done
|
||||||
|
|
Loading…
Reference in New Issue