Update monitor_nchan

This commit is contained in:
bergware
2023-07-18 17:03:19 +02:00
parent a1e6c4a7a7
commit 1caadf7da0

View File

@@ -15,7 +15,8 @@ while :; do
# steady state?
subs=$(curl --unix-socket $nginx $status 2>/dev/null|grep -Pom1 'subscribers: \K\d+')
if [[ -z $subs || $subs -eq 0 ]]; then
# kill GUI registered nchan processes
logger -t monitor "Stop running nchan processes"
# kill GUI registered nchan processes
while IFS=$'\n' read -r running; do
pkill -f $docroot/${running/:stop/}
done < $nchan_pid
@@ -27,3 +28,4 @@ while :; do
# check every 30 seconds
sleep 30
done &
disown %%