Hallo Alex,
> Am 24.09.2014 um 00:42 schrieb Alexander Wollmann > <[email protected]>: > > Liebe Liste, > > ich bräuchte mal eine Idee... > > Folgendes: Ich habe viele linbo-remote-Einträge in /etc/cron.d > > z.B. hier: > > 10 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r cr1 -w 60 -c > sync:1,sync:2,halt > 15 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r pol -w 60 -c > sync:1,sync:2,halt > 30 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r cr2 -w 60 -c > sync:1,sync:2,halt > 35 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r phy -w 60 -c > sync:1,sync:2,halt > 40 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r bio -w 60 -c > sync:1,sync:2,halt > 42 5 * * * root ist-heute-schultag && /usr/sbin/linbo-remote -r kur -w 60 -c > sync:1,sync:2,halt > > So wie das im Moment konfiguriert ist, schickt der cron-Daemon für jede Zeile > eine E-Mail. Ich will den Inhalt der E-Mails auch bekommen, da ich so > erkennen kann welche PCs "hängen" und keine linbo-remote-Befehle entgegen > nehmen. Allerdings würde mir eine Mail pro Tag reichen... > > Kann man das irgendwie hinbekommen, dass die Ausgabe von linbo-remote nicht > per mail rausgeht, sondern an ein Textfile angehängt wird? Dann könnte ich > mir diese Datei einmal pro Tag per E-Mail zusenden lassen (per cron-job) und > sie dann löschen. > > Hat jemand eine Idee wie das einfach umzusetzen ist? > > Viele Grüße > Alex Du hängst an die erste Zeile ein >/pfad/zur/logdatei 2>&1 an und an alle weiteren: >>/pfad/zur/logdatei 2>&1 Das einzelne Größerzeichen steht für "Datei neu anlegen", das doppelte für "hinten anhängen". Das 2>&1 leitet auch etwaige Fehlermeldungen in die Datei. Viele Grüße Jörg Richter _______________________________________________ linuxmuster-user mailing list [email protected] https://mail.lehrerpost.de/mailman/listinfo/linuxmuster-user
