[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Hilfe- & News-Center • Thema anzeigen - Script möglich?

Script möglich?

Wenn die Installation geschafft ist, dann geht es hier weiter: Feinabstimmung ist angesagt!

Moderator: Balumir

Script möglich?

Beitragvon Mike » Sa Jul 26, 2003 22:03

Benutzeravatar
Mike
Administrator
Administrator
 
Beiträge: 750
Registriert: Do Aug 30, 2001 1:00
Wohnort: In Deutschland ganz oben

Beitragvon arnim » So Jul 27, 2003 15:01

Hi!

Agrrr, wieso funktioniert folgendes nicht? Ich habe mir solche Muehe gegeben:-/
Das Script gibt nix aus:-(

#!/bin/bash
# *********************************************************
# * *
# * Creation: 27.07.2003 as *
# * Last update: 27.07.2003 as *
# * *
# * Arnim Staschke *
# *********************************************************
#
# ---------------------------------------------------------
# + Begin user editable +
# ---------------------------------------------------------
#
# Please edit and the following line if nessesary (I think not):

LOGFILE=/var/log/messages

# Please edit the following line,
# Put in your errormessage

#ERRORMESSAGE=eindeutiger_string_der_meldung
ERRORMESSAGE=kernel

# ---------------------------------------------------------
# + END user editable +
# + Don<B4>t edit below this line! +
# ---------------------------------------------------------


if [ ! -e "$LOGFILE" ]; then
echo ERROR: File does not exist on that place, you told me!
echo ERROR: Please correct the path.
exit 0
fi

while true
do
#
FINDIT=`tail -f $LOGFILE | grep $ERRORMESSAGE`


if [ "$FINDIT" = "$ERRORMESSAGE"]
then

#zum testen als echo. Spaeter der BEfehl
echo funktioniert > /home/arnim/funktioniert.txt

fi
done
Benutzeravatar
arnim
LUG Flensburg
LUG Flensburg
 
Beiträge: 356
Registriert: Fr Aug 31, 2001 1:00

Beitragvon bernd » So Jul 27, 2003 16:34

Benutzeravatar
bernd
Aktiv
Aktiv
 
Beiträge: 104
Registriert: Do Aug 30, 2001 1:00
Wohnort: Wallsbuell

Beitragvon arnim » So Jul 27, 2003 20:46

Moin Bernd:-)

Ah, ja, sowas blödes.

Habe nun den ganzen Nachmittag gebastelt.... Nu habbich es. Ein Top Script;-)
Ist per Mail an Mike unterwegs.

#!/bin/bash
# *********************************************************
# * If some errormessage occours, do something *
# * *
# * Creation: 27.07.2003 as *
# * Last update: 27.07.2003 as *
# * *
# * (C) Arnim Staschke 2003 *
# *********************************************************
#
# ---------------------------------------------------------
# + Begin user editable +
# ---------------------------------------------------------
#
# Where is your logfile?
# Please edit the following line if nessesary (I think not):

LOGFILE=/var/log/messages

# Please edit the following line:
# Put in your errormessage
# Example 1:
# ERRORMESSAGE='eindeutiger_string_der_meldung'
# Example 2:
# ERRORMESSAGE='kernel: linkstatus=DISCONNECTED (unhandled)'

ERRORMESSAGE='kernel'

# ---------------------------------------------------------
# + END user editable +
# + Don't edit below this line! +
# ---------------------------------------------------------
if [ ! -e "$LOGFILE" ]; then
echo ERROR: File does not exist on that place, you told me!
echo ERROR: Please correct the path.
exit 0
fi

while true
do
tail -q $LOGFILE | fgrep "$ERRORMESSAGE" > /dev/null
RESULT=$?

if [ "$RESULT" -eq 0 ]; then

# ---------------------------------------------------------
# + BEGIN user editable +
# ---------------------------------------------------------
#
# insert your command
# and delete the line "echo this ist your command"
# Example:
# /sbin shutdown -h now
# /etc/rc.d/rc.pcmcia restart

echo this is your command, replace this line with your command!

# Stop this for two seconds. Adjust the sleeptime for your need.
# Highrer sleeptime is better. If a 4 seconds query is to slowly,
# try three or two seconds. It`s your choice;-)
# If you put a comment sign (#) in front of sleep, this script is
# running and running and running, so fast as possible.
# A higher setting is the better choice.
# Edit here:

sleep 4

# ---------------------------------------------------------
# + END user editable +
# + Don't edit below this line! +
# ---------------------------------------------------------

fi
done
Benutzeravatar
arnim
LUG Flensburg
LUG Flensburg
 
Beiträge: 356
Registriert: Fr Aug 31, 2001 1:00

Beitragvon bernd » So Jul 27, 2003 21:21

Benutzeravatar
bernd
Aktiv
Aktiv
 
Beiträge: 104
Registriert: Do Aug 30, 2001 1:00
Wohnort: Wallsbuell

Beitragvon arnim » So Jul 27, 2003 22:27

Benutzeravatar
arnim
LUG Flensburg
LUG Flensburg
 
Beiträge: 356
Registriert: Fr Aug 31, 2001 1:00

Beitragvon Mike » So Jul 27, 2003 23:01

Benutzeravatar
Mike
Administrator
Administrator
 
Beiträge: 750
Registriert: Do Aug 30, 2001 1:00
Wohnort: In Deutschland ganz oben

Beitragvon arnim » So Jul 27, 2003 23:09

Benutzeravatar
arnim
LUG Flensburg
LUG Flensburg
 
Beiträge: 356
Registriert: Fr Aug 31, 2001 1:00


Zurück zu Anwendungen & Konfiguration

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 15 Gäste

cron