cinternet

Aus Mikiwiki
(Weitergeleitet von Cinternet)
Wechseln zu: Navigation, Suche

Der Shell-Befehl cinternet ist ein einfaches Frontend für den Daemon smpppd.

Inhaltsverzeichnis

Verwendung

Skript "/home/uta/bin/dsl-reconnect.sh" mit den Rechten 744 zum Neuverbinden einer DSL-Verbindung.

#!/bin/bash
#
# Script to check if ADSL is disconnected & try reconnecting
#
# Checking the status of device dsl0 for the word 'disconnect' and
# storing the result in a variable called 'status'
status=$(cinternet -i dsl0 -s | grep disconnect)
#
# Test to see if the value is not NULL
if [ -n "$status" ]
  then
    # The interface is down, start the interface
    cinternet -i dsl0 -A
    sleep 10
  else
    # The interface is up, just exit
    exit 0
fi

Eintrag in die Crontab von Benutzer "uta".

# DSL-reconnect
* * * * * /home/uta/bin/dsl-reconnect.sh

Weblinks