0

Please can any one help me with a script to restart apache2 at boot on ubuntu 10.04. I have tried so many tutorials but never worked and I tried crontab -e but is there any other way? because it only restart after boot. thank you.

RichK
  • 1

1 Answers1

0

If i understood correctly, you want some delay time before restarting apache2.
If so, add this to crontab:

# On boot wait 20 seconds and restart apache2 service
@reboot sleep 20 && service apache2 restart
Taavi
  • 686
  • yes please that is what I meant, I will try it an give you the feed back. thank you for your reply. I am grateful – RichK Jun 13 '16 at 22:35
  • Please I have just applied your answer and it worked perfectly. – RichK Jun 14 '16 at 08:26