Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 822057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:44:37+00:00 2026-05-15T02:44:37+00:00

On a Ubuntu 10.04 Server I would like to do the following with a

  • 0

On a Ubuntu 10.04 Server I would like to do the following with a bash script:

Create a service that monitors the ISDN connection and if downtime exceeds 60 seconds forces reconnect.
My current solution looks something like this:

#!/usr/bin/bash
LOGFILE=/home/msw/router/ping-stats.txt
TIME="`date +%C%y%m%d%H%M`"
/sbin/ping -c 1 google.com > /dev/null 2>&1
if [ "$?" == "0" ]
then
        STATUS=1
else
        STATUS=0
fi
echo "$TIME $STATUS" >> $LOGFILE

Since bandwidth is precious on an ISDN connection, I would like to avoid the ping and replace it with a command that simply checks for the status of the network device. Is it possible to infer from that if the connection is “up”?

I would also like to implement the solution as a service that checks connectivity continually instead of checking periodically with a cronjob.

I would really appreciate it if somebody could push me in the right direction.

Thank you

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:44:38+00:00Added an answer on May 15, 2026 at 2:44 am

    For quick-and-dirty there’s nm-tool. dbus-send can be a bit more precise, but needs knowledge of how D-Bus works with NetworkManager. If you want something persistent then you’ll need to learn how to interact with D-Bus, but that may require using something a bit lower-level such as Python.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'va installed ubuntu server 10.41 in Vm ware, and I would like to install
I would like a script that does one thing if I am on campus
I am running an Ubuntu Server. I would like for it to have a
I would like to compile this software : http://snap.stanford.edu/snap/download.html on ubuntu 9.10 server. My
I would like to retrieve multiple log files from an Ubuntu server (using Python
I would like to be able to use a Python script that I wrote
I would like to deploy a private cloud using Ubuntu Server 9.10. There is
I would like to know which backup software to use with my ubuntu server
I have a laptop running Ubuntu that I would like to act as a
I have an ubuntu server (11.10) on a single-board computer that occasionally is subject

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.