• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

client.sh and Apache

B

bttman

Guest
Hi to all.

This is more of a question, then a problem.

I'm using a php that block's client accounts, once they expire, with a crontab, every day.

The php script uses the following shell command: /usr/local/psa/bin/client.sh --off ' client login' and it works great.

The question is, the client.sh in the end, restarts apache right ? if so, apache fails to restart on my box, only by hand with service httpd restart.

Is there a way to avoid client.sh from restarting apache, since, the apache is restarted every 900 secs. ?

PS: also, the /usr/local/psa/bin/client.sh --on ' client login' does not restart apache, any diference from ON to OFF ?

Thanks in advance
 
Apache will get restarted every 900 seconds (or whichever number you set in Plesk) only if there was some change made that would require an Apache restart.

For example, if there are no changes made to Plesk settings, Apache will not get restarted at all, for hours or days (unlikely, but possible).

But if somebody changes something in Plesk that would need an Apache restart, it won't restart right away. It will restart in 900 seconds.

So your script needs to restart Apache.

You might use a service monitor, such as SIM, to monitor if your httpd is running. Such scripts than automatically restart a service that doesn't run. SIM can be found here.
 
Thank you guys for the replys,

I was thinking of a script to "spy" on apache, if it's down, the script would try to get apache up again.

But I found the solution, it's very simple.

PROBLEM:

the problem is that, the childes were left behind, blocking port 443, and don't allow main apache daemon to start.

SOLUTION:

vim /etc/rc.d/init.d/httpd

put "sleep 5" between stop and start in restart section

That's all, it works...

Thanks again for all the help
 
Back
Top