linux scripting
hey everyone...
red hat 9 user here... have a question about scripting... i want a script to run everytime i start up my PC that will grep the entire contents of an ifconfig and output it to a txt file, and email the text file to myself. i beleive i have sendmail running properly... maybe someone here can point me in the right direction? |
You may add it do starting scripts (/etc/rc.d/init.d and then symlinked to the right directories: /etc/rcX.d where X is your runlevel; that's 'cleaner', but harder method) or just add the commend to run it to /etc/rc.local (that's one of the scripts that are run at boot automaticaly).
|
You could add something like this to the end of rc.local:
/sbin/ifconfig | grep something | mail user@host.com -s "IP details" |
All times are GMT -5. The time now is 10:38 PM. |