Mar 31, 2008

LINUX: Auto check the Zone Edit every 60 sec



Erm, one of my friend ask me how can he make an auto check to the zone edit for every 60 secs by using cron. My answer is simple.. I dont know how to use cron. haha.. so I'm thinking sumthing else, I come out with a script which I do write a simple one just to make it check to zone edit for every 60 seconds.

Here is my script looks like:
#!/bin/bash
#
#
#
#

while :;do echo "=========================================================" ;
wget -q -O - --http-user=username --http-passwd=password \
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com';
sleep 60;
done

#hehe.. mungkin saja berjaya.


How to apply this script to run every time you load your linux? Simple, here is the steps I would make:
  • mkdir ~/.script ; cd ~/.script
  • wget http://portalpsis.net/upload/files/zoneedit
  • ln -s ~/.script/zoneedit /usr/bin
  • Now we need to edit our rc.local so that the script will load on startup.
  • sudo gedit /etc/rc.local
  • and add this line before "exit 0" ---> /usr/bin/zoneedit &
So now you will have this script load on every session you make. To check if it's succesfully loaded, please reboot you machine and login back.. Once login successful, open up terminal and run "ps aux | grep zonedit" and you will see an output with pid of the script running.

This one made for my friend Sinzmanual. :)

ps:- the bold part in the script need changes to be able to check to zone edit. use your own usernames,password and domain.


Thank you for your unbelievable support on Negative Zero - Permission to read and write blog for nearly 4 years. Don't forget to like Negative Zero on Facebook.
Blogirific.com Blog Directory





Post(s) you might like to read :

Comments
0 Comments

0 comments:

Post a Comment