Tuesday 8 April 2014

run commands at startup automatically using rc.local !

Hi,
Today I will let you know a magic operation that will lessen your hours of work! Suppose you have web server and you are the web master of that server. Now as I am living in India and still Namo is not PM so in Gurgaon electricity fluctuates frequently. And again as Namo is not PM you didn't have generators.

So every time electricity goes off, you have to configure your webserver so that it is up and running. For example you have to run a script to start your application running. But now you don't have to do that manually!!

Suppose you have linux platform then following details will be useful as mentioned above.

Suppose you want to execute py script abc.py everytime you want to start your server. Rather then typing command on terminal everytime at the time of reboot, you can put this command(python /pathto/abc.py) in /etc/rc.local before exit 0 statement.

Hope this miniblog helps!

No comments:

Post a Comment