Answer the question
In order to leave comments, you need to log in
How to write *.sh-script (centos6) for smooth reboot?
Good day! There is a small problem that I can't solve. I use ISPmanager5, in the scheduler I set a scheduled reboot of my server (just lunux with the reboot command). I need to restart the server more smoothly according to the plan:
1. Stop nodeJS
2. Stop MySQL
3. Stop the web server (Apache + PHP)
4. reboot
I have a CentOS x64 system
And I need to reboot when all services have stopped!
Help write *.sh-script.
Answer the question
In order to leave comments, you need to log in
What actually does not suit the regular reboot? It still sends a regular signal about a regular stop
So you need something like:
service nodejs stop && service mysqld stop && service apache2 stop && reboot
reboot
Everything else will be done by itself :) Read about init and system start/stop order.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question