Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

in /etc/ppp/ip-up.d/script I have the following that runs fetchmail when the ppp0 interface is up (connected) and when it finish the modem ends internet conection automatically.

 #!/bin/sh
 /usr/bin/fetchmail -v -f /etc/fetchmailrc -L /var/log/fetchmail.log
 killall wvdial

this works perfectly. now i need to add to the script below the fetchmail command execution something that checks if the mail queue of Postfix is completely empty and if is true then execute the command killall wvdial to hangup the modem.

In theory i know i could do something using if, else, do, while, until etc. but in practice i do not know how to develop it. I would like you guys to help me to program and complete this script to work properly. I appreciate the comments.

share|improve this question

closed as not a real question by Bruno Pereira Apr 6 '12 at 12:42

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Hello, this question has no information and activity for a very long time. I am closing it for now. If by any reason you think this question is still viable or useful in anyways or that there is still a good chance it will be answered please flag it to a moderator or add a comment with the reasons why you want it open. Regards –  Bruno Pereira Apr 6 '12 at 12:41

Browse other questions tagged or ask your own question.