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

Re: [Debian]: pppd



On Mon, 9 Mar 1998, Florian Frank wrote:

> Hallo,
> 
> Ich habe jetzt gerade smail, fetchmail und meinen ppp - Zugang zu T- Online
> richtig konfiguriert und es funktioniert alles hervorragend. Aber ich
> möchte meine E - Mails und ca. 3 Uhr abholen. Da der Rechner aber nicht 24
> Stunden am Tag läuft, habe ich ihn an eine Zeitschaltuhr gehängt, die ihn
> um diese Uhrzeit einschaltet. Die Progamme, die der Rechner dann ausführen
> soll, habe ich auch richtig in die Datei /etc/crontab eingetragen. Es fehlt
> mir nur noch eine Möglichkeit, wie ich direkt nachdem sowohl meine Mails
> versendet, als auch abgeholt worden sind, die Leitung zum Provider gekappt
> wird, damit ich nicht unnötig Telefonkosten zahlen muß.
> [schnippitischnapp]
> Also, falls jemand dieses Problem bereits gelöst hat, oder eine Lösung
> weiß, so möchte er mit doch bitte schreiben.

Hi Florian!

Also ich hatte ein ähnliches Problem (ich wollte nicht immer drauf achten,
daß der pppd auch schnell und kostenparend beendet wird wenn ich Mail hole)
und hab es folgendermaßen gelöst.

1. Ich hab' ein Script namens /usr/local/bin/psync angelegt (wobei der name
   ziemlich egal ist)

   --------------------------------------------------- /usr/local/bin/psync
   #!/bin/sh
   pon
   date > /var/lock/psync
   ------------------------------------------------------------------------

2. Ich hab' das Script /usr/bin/pon in /usr/local/bin/pon kopiert und leicht
   modifiziert

   ----------------------------------------------------- /usr/local/bin/pon
   #!/bin/sh
   if [ -f /var/lock/psync ]; then
	rm /var/lock/psync
   fi
   if [ -r /etc/ppp.options_out -a -r /etc/ppp.chatscript ]; then
	/usr/sbin/pppd connect "/usr/sbin/chat -v -f /etc/ppp.chatscript" `cat /etc/ppp.options_out`
   else
	echo "You do not have permissions to access /etc/ppp.chatscript or /etc/ppp.options_out"
   fi
   ------------------------------------------------------------------------

   Wichtig ist dabei eigentlich nur, daß der rm drin ist, damit sich der
   Mist bei einem Abbruch nicht "frist".

3. Ich hab das Script /etc/ppp/ip-up leicht angepaßt

   --------------------------------------------------------- /etc/ppp/ip-up
   #!/bin/sh

   # .....
   # [schnippitischnapp]
   # .....

   # first -- push our outgoing mail to the SMTP server
   runq

   # next -- get our mail from our POP3 account(s)
   fetchmail --all --fetchmailrc /etc/ppp/fetchmailrc

   # last -- fetch the news with leafnode via NNTP
   su news -c "/usr/sbin/fetch"

   # should we disconnect now ??? -- check for special lock file
   if [ -f /var/lock/psync ]; then
	rm /var/lock/psync
	poff &
   fi

   # last line
   ------------------------------------------------------------------------

So, das wars auch schon (puh - zum Glück). Damit klappt bei mir eigentlich
prima. Ob man das allerdings sauberes *nix hacking nennen darf weis ich
nicht. Ich bin da halt mehr der Praktiker - Hauptsach' es läuft!

Wenn du den kompletten Satz Scripte haben willst, mail mich doch noch mal
an, ansonsten denke ich man lernt und begreift mehr dabei, wenn manns selber
einhackt.

Ciao

Daniel

--------------------------------------------------------------------------
Daniel Gross                                     eMail: dg@bingo.baynet.de
Hollarstrasse 2                                         dgross@gmx.net
D-85053 Ingolstadt, Germany
--------------------------------------------------------------------------

Marriage is based on the theory that when a man discovers a brand of beer
exactly to his taste he should at once throw up his job and go to work
in the brewery.
		-- George Jean Nathan

------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie
bitte eine E-Mail an majordomo@jfl.de die im Body
"unsubscribe debian-user-de <your_email_address>"
enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@jfl.de
------------------------------------------------
Anzahl der eingetragenen Mitglieder:     399


Reply to: