Zitat:
Zitat von dey
Cronjob der die neue IP bemerkt und per Email an mich verschickt
|
Code:
#!/bin/bash
curl -s "http://ipecho.net/plain" -o /tmp/new-ip
if ! cmp -s /tmp/old-ip /tmp/new-ip ; then
mail </tmp/new-ip -s "Neue IP-Adresse" dey@example.com
cp /tmp/new-ip /tmp/old-ip
fi
__________________
Any feature is a bug unless it can be turned off. (Heuer's Law, 1990)
Geändert von usch (08.11.2018 um 11:44 Uhr)
|