This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Restart Batchfile

Hello astaro online community

I want to know if it's possible to implement a batchfile which restarts the complete  firewall every day?. What are the necessary steps.

This is a workaround for a hardware issue.

Kind Regards for your help.

Patrick


This thread was automatically locked due to age.
Parents
  • Patrick,

    you can add a file called crontab.reboot in the directory /etc and add the following line into that file:

    For example:
    59 23 * * * root /sbin/reboot

    This will reboot your machine every day at 23:59.
    /bagira
Reply
  • Patrick,

    you can add a file called crontab.reboot in the directory /etc and add the following line into that file:

    For example:
    59 23 * * * root /sbin/reboot

    This will reboot your machine every day at 23:59.
    /bagira
Children
  • Which is not adviseable, since it will spoil the log rotation & archiving mechanism. ASL relies on being turned on 24/7, but if you absolutely MUST perform a daily reboot, I would do this at times were no scheduled processes should be running. Take a look in the crontab at which times processes are run and pick a time where you are sure that no process will be interrupted or skipped by reboot/downtime.

    Regards,
    andreas
  • Hello Andreas

    How can i exactly find out which processes are scheduled?

    Kind Regards Patrick
  • Hello Bagira

    Thank you very much for fast help. I will try your batchfile, when i receive a answer from andreas.

    Kind regards patrick
  • Hello Bagira

    I've created the crontab.reboot file and added the lines which you posted, but no restart was initiated. Must i edit the crontab file itself or must i edit another file?

    Kind Regards Patrick
  • Sorry, forgot to say that cron has to be restarted. After adding the file crontab.reboot the cron must be restarted with /etc/rc.d/cron restart. You should find an entry for  the reboot at the end of your crontab file. But as Andreas said, it is better to arrange a reboot after the other scripts run. You can do that at 4 or 5 am. Change the  line in the file to
    59 3 * * * root /sbin/reboot

    /bagira
  • Hello Bagira
    I made the thinks which you mentioned and i restarted the con, but in the crontab file there's no entry for the crontab.reboot file! What's wrong

    Kind regards

    Patrick
  • Hello Togehter

    I complettly restarted the asl and after this the line to the crontab file was added and the restart was initiated at the scheduled time.

    Thanks for the help

    Patrick