Howto stop squid before executing crontab file?
Hi,
I am using squid 2.6 on my cent os 5 .I want to shutdown the system at 7:00 pm for that purpose I write in # crontab -e 0 19 * * * /sbin/shutdown -h now The thing which I want to clear that when the system will going to turn off it will also stop squid service? If not then how can I automatically stop squid service and then crontab file execute ? kindly guide me garden |
Quote:
Kind regards |
Hello,
Normally your system should take care of that. You can have a look in the /etc/rc.d/rc0.d folder to check when (in what order) your services are shutting down. The higher the number, the later the service will stop. This is done so that dependent services get stopped before the service they depend on. Kind regards, Eric |
Thnks for the reply. I can check it by
# vi /etc/rc.d/rc0.d what you say If I a script may work Code:
vi /root/auto_shutdown_script |
While you shutting your system, All services running on the server will going to shutdown.
Just shutdown the system and forget everything. |
EricTRA as you mentioned in your post You can have a look in the /etc/rc.d/rc0.d folder to check when (in what order) your services are shutting down. How can I check it ?
kindly just explain it thanks garden |
Hello,
Just do: Code:
ls /etc/rc.d/rc0.d Code:
K01dnsmasq -> ../init.d/dnsmasq At this link you can find some more basic information about runlevels and init scripts. Kind regards, Eric |
All times are GMT -5. The time now is 01:19 AM. |