Restarting apache on a cron


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Create a file in /etc/cron.hourly/
  2.  
  3. chmod it to 755
  4.  
  5. make it contain:
  6.  
  7. #!/bin/bash
  8.  
  9. if [ -z "$(pidof httpd)" ]; then service httpd restart; fi

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.