LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-15-2007, 11:47 AM   #1
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Rep: Reputation: 199Reputation: 199
Autoreboot on lost DSL connection?


Last year, I migrated my old AO-Hell homepage to my own dedicated server at home, in preparation for setting up a more elaborate website. After the past year of on-again, off-again troubleshooting, I finally have it set up to where the DSL connection and Apache server both work fine as soon as it finishes booting. My problem is, given our wonderful Florida weather (you can almost set your watch to when the thunderstorms pop up!) I occasionally lose my DSL connection, and the only way to restore it is to reboot.

What kind of connection monitor can I add to force an automatic reboot when this happens? Thanks in advance.

I almost forgot! This is an old Gig-n-a-third Thunderbird running Mandriva 2006.

Last edited by Lenard Spencer; 09-15-2007 at 11:48 AM. Reason: Forgot some info
 
Old 09-20-2007, 03:06 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can easily set up some sort of cron job to ping a remote site and reboot if it fails...

ping google.com -c4 > /dev/null 2>&1 || reboot

but i'd really really suggest that this isn't ever going to be fun. have you actually looked at how painfully cheap it is to rent *real* shared hosting? if you're keeping this server up just for the website, then your electricity bill for that box may well cost more than the equivalent hosting... and that would give you much much better uptime and infinitely better bandwidth and all sorts.
 
Old 09-20-2007, 11:20 PM   #3
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Original Poster
Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by acid_kewpie View Post
well you can easily set up some sort of cron job to ping a remote site and reboot if it fails...

ping google.com -c4 > /dev/null 2>&1 || reboot

but i'd really really suggest that this isn't ever going to be fun. have you actually looked at how painfully cheap it is to rent *real* shared hosting? if you're keeping this server up just for the website, then your electricity bill for that box may well cost more than the equivalent hosting... and that would give you much much better uptime and infinitely better bandwidth and all sorts.
Actually, this box serves as my DSL gateway/printserver for the whole house, and since the static IP is a free extra with my plan, migrating my old AO-Hell page to my home server has several advantages, including more control, more storage space, and (hopefully!) a good learning experience. Currently my upstream speed is 384kbps, but since I'm not hosting any podcasts or other bandwidth-intensive content, I'm not really concerned about that right now. I have been toying with idea of podcasting, though, and if that happens, I definitely will be moving that offsite.

Thanks for the help.
 
1 members found this post helpful.
Old 09-21-2007, 12:19 AM   #4
digen
Member
 
Registered: Dec 2005
Location: India
Distribution: Ubuntu Feisty Fawn
Posts: 107

Rep: Reputation: 15
Instead of rebooting the machine, does a router/modem reboot fix the issue ?

If that does then you could write an expect script or use autoexpect to automate and write one for you. You could then write a similar cron which acid_kewpie mentioned earlier and get things up and running again.
 
Old 09-21-2007, 01:54 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by Lenard Spencer View Post
Actually, this box serves as my DSL gateway/printserver for the whole house, and since the static IP is a free extra with my plan, migrating my old AO-Hell page to my home server has several advantages, including more control, more storage space, and (hopefully!) a good learning experience. Currently my upstream speed is 384kbps, but since I'm not hosting any podcasts or other bandwidth-intensive content, I'm not really concerned about that right now. I have been toying with idea of podcasting, though, and if that happens, I definitely will be moving that offsite.

Thanks for the help.
There is a *vast* difference between some shitty AOL webpage package and usnig someone like dreamhost. I paid dreamhost $27 for the whole year and in exchange have 250GB of disk space, 3TB of bandwidth a month at a maximum on 30mbps... you still think you have an edge over that?
 
Old 09-21-2007, 08:03 PM   #6
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Original Poster
Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by acid_kewpie View Post
There is a *vast* difference between some shitty AOL webpage package and usnig someone like dreamhost. I paid dreamhost $27 for the whole year and in exchange have 250GB of disk space, 3TB of bandwidth a month at a maximum on 30mbps... you still think you have an edge over that?
It's pretty bad when a user posts a question just to wind up getting FLAMED by, of all people, a MODERATOR!!!
 
Old 09-22-2007, 06:13 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i'm not flaming, sorry if it sounded that way, i gave you what appears to still be a totally valid answer to your question, it's just that i've personally learnt from experience that the reality of hosting from under the stairs is often more of a burden than a benefit.
 
Old 09-23-2007, 12:09 PM   #8
Lenard Spencer
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, Linux from Scratch
Posts: 329

Original Poster
Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by acid_kewpie View Post
i'm not flaming, sorry if it sounded that way, i gave you what appears to still be a totally valid answer to your question, it's just that i've personally learnt from experience that the reality of hosting from under the stairs is often more of a burden than a benefit.
Apology accepted. This is still a hobby and a learning experience for me, but if it ever takes off, I will definitely be looking for a webhost.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
DSL, i can`t setup my dsl internet connection . grimlair Linux - Laptop and Netbook 2 09-02-2007 12:59 PM
After GCC package install- Lost DSL connection Marlinnhag@aol.com SUSE / openSUSE 0 10-12-2006 03:07 PM
SUSE9.2 I-net connection lost after short time - DSL behind a router... Zzorrkk SUSE / openSUSE 8 02-01-2005 08:11 AM
Lost Connectivity DSL Static IP Red Hat 6.2 aimstr8 Linux - Networking 7 05-01-2002 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration