Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
30 lines
704 B
Bash
Executable File
30 lines
704 B
Bash
Executable File
#! @runtimeShell@ -e
|
|
|
|
# skip this if there are no modems at all
|
|
if ! stat -t "@spoolAreaPath@"/etc/config.* >/dev/null 2>&1
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
echo "faxq started, waiting for modem(s) to initialize..."
|
|
|
|
for i in `seq @timeoutSec@0 -1 0` # gracefully timeout
|
|
do
|
|
sleep 0.1
|
|
# done if status files exist, but don't mention initialization
|
|
if \
|
|
stat -t "@spoolAreaPath@"/status/* >/dev/null 2>&1 \
|
|
&& \
|
|
! grep --silent --ignore-case 'initializing server' \
|
|
"@spoolAreaPath@"/status/*
|
|
then
|
|
echo "modem(s) apparently ready"
|
|
exit 0
|
|
fi
|
|
# if i reached 0, modems probably failed to initialize
|
|
if test $i -eq 0
|
|
then
|
|
echo "warning: modem initialization timed out"
|
|
fi
|
|
done
|