I have written a little program that checks some computer ip's that have some internal web pages on them. It works fine, (so I dont really want to re do the whole thing at this point) Normally the program works fine w/out any problems.
However as one always does, you always want to tweak it a bit. Normally the program runs from a cron job. Great. But sometimes I run it manually by just typing the command in the command prompt. The problem is that if im not in the right directory it doesnt work properly. This is due to the fact that wget when it is run, creates an index.html file which I use to see if it exists to see if the web server is running. If the index file is in another directory I cant test to see if it is there and it will always fail. Right now I use .... # run wget wget --tries=5 --dont-remove-listing 10.1.0.36:12000 #Then check for file in location if ! [ -e /root/index.html -o -e /root/bin/index.html ]; then ... Run command to email me if the it fails to find the index file. Basically it works fine. Its just if I run it outside of the directory (the script is run from my local bin which is in my path) that the if looks in that it fails. Im no script genius. Its simple and functional. Is there options that anyone knows of with wget that can staticly tell it where to put the index file. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
