while ! postqueue -p | grep -q empty; do sleep 1 done killall wvdial
this script checks if my mail queue is empty, then disconnects my modem. now i would like to add also a checking to fetchmail if is running. i am not sure how to develop it but i know that it can be something like the down example.
while ! postqueue -p | grep -q empty && "fetchmail process is not running"; do
some help please?