Scripts needs to run after restarting the server also
i am having a script which is running as a daemon, the script should run even if i restarted my server also. kindly guide me how can i acieve the same.
|
Hello,
If you tell us what distro and version you are using then we might be able to give you the correct commands without having to list all possibilities. Kind regards, Eric |
Its LINUX redhat 5 enterprise version
Its LINUX redhat 5 enterprise version which is running on virtual machine... My script is having infinte loop which is achieved by using while loop.
|
Hello,
There are several ways. The easiest one is to include the startup line for your script in /etc/rc.d/rc.local. In doing that your script will start after all the other init scripts. That way you can avoid the second, more complicated way which is to create a startup script for your daemon, place that in /etc/init.d/ and add it to the appropriate run levels using the chkconfig command. Kind regards, Eric |
Thnks alot
Thnks alot, its working properly
|
Hi,
Glad you've got it working. If you consider your problem/question solved then please mark this thread as such. Have fun with Linux. Kind regards, Eric |
All times are GMT -5. The time now is 12:11 AM. |