Wie Michael schreibt: ein script draus machen. Hier ein Vorschlag, wie
ich es verwende, um die Räume abzuarbeiten:

#!/bin/bash

for i in $(cat /root/scripts/raeume_to_sync.txt); do
    /usr/sbin/linbo-remote -r $i -w 60 -c sync:1,sync:2,halt >
/root/scripts/synced_$i.log 2>&1 &
    done;


In der Datei raeume_to_sync.txt steht pro Zeile eine Raumbezeichnung. In
den Dateien synced... stehen die Ausgaben vom letzten Aufruf; es wird
jedesmal überschrieben.

Noch eine IF-Abrage aussenrum (ist-heute-schultag ist ein script mit
positiver Rückmeldung, oder):

if ist-heute-schultag
 then for i in $(cat /root/scripts/raeume_to_sync.txt);
        do /usr/sbin/linbo-remote -r $i -w 600 -c sync:1,start:1 >
/root/scripts/synced_$i.log 2>&1 &
     done;
fi


Viele Grüße,
Helge

Am 23.09.2014 um 18:42 schrieb Alexander Wollmann:
> 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
>     
> 
> 

-- 
Helge Münnich
Merian-Schule Freiburg
_______________________________________________
linuxmuster-user mailing list
[email protected]
https://mail.lehrerpost.de/mailman/listinfo/linuxmuster-user

Antwort per Email an