FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-12-2009, 06:46 PM
"Andrew M.A. Cater"
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

On Thu, Nov 12, 2009 at 07:31:18AM +0000, hadi motamedi wrote:
> Dear All
> Can you please do me favor and let me know how can I set my Debian server to
> be automatically rebooted at pre-specified times each day ? Please be
> informed that my Debian server version is read as "/proc/version : Debian
> 1:3.3.5-13" and I need it to be automatically rebooted at 2:00 A.M. each day
> .
> Let me thank you in advance

That looks odd: not least because there never was a Debian 1.

For comparison: here is /proc/version on the machine in front of me:

Linux version 2.6.26-2-amd64 (Debian 2.6.26-19lenny1) (dannf@debian.org)
(gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25))
#1 SMP Mon Oct 19 02:34:17 UTC 2009

[Lines broken by me - on screen it was all one line.]

>From this and other questions posed by you on this and other lists:

Are you _SURE_ you're running Debian? Did you install this machine with
its software , or did you take on a machine built a long time ago by
somebody else?

Send us the output of

cat /etc/debian-version

The machine in front of me gives 5.0.3

cat /etc/issue

gives

Debian GNU/Linux 5.0
l

It's always possible that someone installed a different Linux then made
it look like Debian to fool hackers e.g. by changing sendmail / apache
messages and others

All the best,

AndyC


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-14-2009, 07:40 AM
Jochen Schulz
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

Please don't top-post.

hadi motamedi:
>
> 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
> ?

Debian uses /etc/rc.local as well. It's a Linux system, after all. ;-)

J.
--
I use a Playstation to block out the existence of my partner.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 11-14-2009, 08:51 AM
Jochen Schulz
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

Please don't top-post.

hadi motamedi:
>
> Sorry . Why my Debian server does not contain /etc/rc.local bootup file ?

I don't know, but nothing keeps you from creating it. The default file
looks like this:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0


J.
--
When standing at the top of beachy head I find the rocks below very
attractive.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 11-14-2009, 09:34 AM
Jochen Schulz
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

hadi motamedi:
>
> Sorry . According to you , I created my own /etc/rc.local and put my own
> bootup script in it . But when I reboot my Debian server I don't see my
> intended startup scripts being effective on my Debian server . Can you
> please let me know why ?

Did you read the comments in the example file I posted? And why do you
keep top-posting?

J.
--
I want to keep my skin looking good but I believe all computers do the
same job.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 11-14-2009, 08:14 PM
Tzafrir Cohen
 
Default 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

That's a bad solution for a simple problem. Why not put the entry you
need in a file under /etc/crontab.d/ ?

BTW: why would you want a daily reboot?

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-14-2009, 08:16 PM
Tzafrir Cohen
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

On Sat, Nov 14, 2009 at 07:44:57AM +0000, hadi motamedi wrote:
> Thank you for your reply . Please be informed that I checked for my Debian
> server version , as the followings :
> #more /proc/version
> Linux version 2.4.27-2-386 (horms@tabatha.lab.ultramonkey.org) (gcc version
> 3.3.5 (Debian 1:3.3.5-13)) #1 Wed Aug 17 09:33:35 UTC 2005
> #more /etc/debian_version
> 3.1
> #cat /etc/issue
> Debian GNU/Linux 3.1
l

You are aware that Debian 3.1 (Sarge) is no longer supported. Now would
be a good time to upgrade to Etch. And from it: to Lenny.

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-15-2009, 08:11 AM
Tzafrir Cohen
 
Default Inquiry:How to set the Debian server to be automatically rebooted at pre-specified times ?

On Sat, Nov 14, 2009 at 09:14:36PM +0000, Tzafrir Cohen wrote:
> 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
>
> That's a bad solution for a simple problem. Why not put the entry you
> need in a file under /etc/crontab.d/ ?
>
> BTW: why would you want a daily reboot?

For instance: if this is due to a memory leak in asterisk 1.4.13, why
not upgrade to 1.4.26.2 ?

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-15-2009, 12:08 PM
"Andrew M.A. Cater"
 
Default 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,

AndyC


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 04:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org