internet connection only to send one mail

dimanche 15 novembre 2015

I have set up
- my usb modem-stick
- "wvdial" to connect to the internet
- ssmtp to send mails via the "mail" command.

Now I want to create a script, that will
1. start wvdial to connect to the internet
2. send a specific mail
3. stop wvdial disconnect

This script can be triggered by any event I define.

Any hint how this script should look like and how to prevent a second trigger to interfere (so if an event triggers the script, while still running from a previous event, it should wait for the first to finish).

Any idea/hint appreciated!

thanks


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor