1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

client.sh and Apache

Discussion in 'Plesk for Linux - 8.x and Older' started by bttman, Jan 9, 2006.

  1. bttman

    bttman Guest

    0
     
    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
     
  2. Ales

    Ales Basic Pleskian

    23
    73%
    Joined:
    Mar 4, 2002
    Messages:
    67
    Likes Received:
    0
    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.
     
  3. bttman

    bttman Guest

    0
     
    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
     
Loading...