[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

On Sat, Nov 14, 2009 at 05:32:42AM +0000, hadi motamedi wrote:
> Thank you very much for your reply . Can you please do me favor and let me
> know what is the equivalent of Linux "/etc/rc.local" bootup script in Debian
> ? In Linux , I put the "crontab crontab.txt" in /etc/rc.local bootup script
> but where I am expected to put it under my Debian server ?
> Thank you in advance
Try this as the user / as root

crontab -e

You should see a line

# m h dom mon dow command

which is put in by the Debian default crontab entry to remind you of the 
syntax :)

To test - adding the line

5 * * * * echo "Hi"

should echo Hi and mail the user.

Crontab entries made in this way survive reboots.

As others have said, 3.1 is now out of support. If others are reliant on 
the server, work out when and how you can take it out of service to 
upgrade (carefully) to 4.0 - now Debian oldstable - and then, 
potentially, to 5.0.

There was no firewall set by default in 3.1 although there was an 
"iptables save" command which would save the current state of whatever 
had been set as iptables rules and an "iptables restore".

iptables -L as root will show whatever iptables rules have been set.
As somebody else said, iptables -F will flush all rules.

Martin Krafft's book - The Debian System - from No Starch Press deals 
well with 3.1 and what was expected in 4.0. A new edition is being 
prepared to deal with 5.0. What's in that edition is not completely out 
of date because it covers a wealth of background information on Debian 
which is still relevant.

ISBN 1-59237-069-0 - also includes a CD of Debian 3.1

Hope this helps,

All the best,


Reply to: