Configure annoyatron900 to die if rowbot is no longer running

This commit is contained in:
Nick Chambers 2021-11-23 20:32:36 -06:00
parent b92dcbc2a8
commit b94a0f0e1d
1 changed files with 6 additions and 1 deletions

7
rowbot
View File

@ -701,7 +701,12 @@ on_sys_init_900_annoyatron900() {
on_sys_register_999_annoyatron900() {
while true; do
read -rt 10 </dev/zero
kill -USR1 "$$"
if is_running "$$"; then
kill -USR1 "$$"
else
kill -INT "$BASHPID"
fi
done &
local alarm_pid=$!