I am using Ubuntu I want to update avast! automatically when I connect to the Internet (NOT at specific times or such).
I currently switch on and off between three diferent connections and three different applications:
ADSL - usbadslmodemmanager
3G - umtsmon
Wireless - network-manager (which does not detect the two other connections)
Hence, I need to know of some script or something that gets run everytime a connection is made, independently of what type and software… If there is such a script…
Then I could just slip in the /usr/bin/avast-update command.
hallo,
this depends on what you call “connection”. It might be script like “sleep 60; wget …”, fired by ifconfig’s “post-up” script, it might be also fired by dhclient/pump/udhcpc post-lease action, etc.
also, naive solutions, like “if last_attempt+21600<now && avast server pings → wget and set last attempt”. basically, avastvpsupdate.pl and avastvpsupdate.sh scripts are usable here too, just don’t spawn them too often (each poll will get at least MD5sum from the server).