Bash Script To For Laptop To Call Home
Join the DZone community and get the full member experience.Join For Free
// description of your code here
// simple script by drDugan on Slashdot Feb 21 2007 ~>cat bin/callhome #!/bin/bash rm -f ~/.locate-laptop date > ~/.locate-laptop w >> ~/.locate-laptop /sbin/ifconfig -a 2>&1 >> ~/.locate-laptop /usr/sbin/traceroute -q 1 -nP ICMP 108.169.242.00 2>&1 | head -15 >> ~/.locate-laptop scp -q ~/.locate-laptop firstname.lastname@example.org:~ // ~>grep callhome /etc/crontab this places it in a cron job 27 * * * * username /home/username/bin/callhome
Bash (Unix shell)
Opinions expressed by DZone contributors are their own.