3 # skip this if there are no modems at all
4 if ! stat
-t "@spoolAreaPath@"/etc
/config.
* >/dev
/null
2>&1
9 echo "faxq started, waiting for modem(s) to initialize..."
11 for i
in `seq @timeoutSec@0 -1 0` # gracefully timeout
14 # done if status files exist, but don't mention initialization
16 stat
-t "@spoolAreaPath@"/status
/* >/dev
/null
2>&1 \
18 ! grep --silent --ignore-case 'initializing server' \
19 "@spoolAreaPath@"/status
/*
21 echo "modem(s) apparently ready"
24 # if i reached 0, modems probably failed to initialize
27 echo "warning: modem initialization timed out"