How can I edit the daily restart script?

Aziz

Verified User
Joined
Oct 4, 2004
Messages
125
Directadmin has a script that runs daily at midnight (00:00:00).

I want to edit that script to make it restart the server (the same command CMD_REBOOT does).

Thanks,
 
I don't know what time cron.daily scripts run on your server. To see:
Code:
$ cat /etc/crontab
Add an executable script to the /etc/cron.daily directory.

Jeff
 
I got an answer from support, thanks:

Edit: /etc/cron.d/directadmin_cron

change:

Code:
10 0 * * * root echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

To:

Code:
10 0 * * * root sleep 5 && echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue && /usr/local/directadmin/dataskq && /sbin/reboot

Sorry for the double post.

Peace,
 
Back
Top