AW: [bf1942] Loging when Screen is activ

Jeff Ives jives2 at unl.edu
Wed Mar 12 15:29:51 EST 2003


#!/bin/sh
while true
do
        killall bf1942-lnxded
        cd /usr/local/games/bf1942-lnxded-1.3beta
        echo "Start" >> ./coop-bf1942-restart.log
        date >> ./coop-bf1942-restart.log
        cp -f ./mods/BF1942/Settings/ServerSettings.con.bak
./mods/BF1942/Settings/ServerSettings.con
        time ./bf1942_lnxded > /dev/null 2> error.log
        tail -n 3 ./error.log >> coop-bf1942-restart.log
        date >> ./coop-bf1942-restart.log
        echo "End" >> coop-bf1942-restart.log
        sleep 10
done

This is what I used to start and auto restart.  I send the stuff to dev null
cause the files would get huge. I nohup and & the script. If you want
on-screen just change /dev/null to a file and then tail -f the file.

----- Original Message -----
From: "paul" <tp-international at t-online.de>
To: <bf1942 at icculus.org>
Sent: Wednesday, March 12, 2003 2:19 PM
Subject: AW: AW: [bf1942] Loging when Screen is activ


> So, now i tried it myself:
>
> I made a file called: serverstart wich the following content:
>
> #!/bin/sh
> ./bf1942_lnxded > /path/to/log/bf-out.log 2> /path/to/log/bf-err.log
>
> Made it executable (e.g. chmod 700 serverstart)
>
> then I typed:
> screen -dmS BF1942 ./serverstart
> in the game-directory
>
>
> Bingo! The two log-files have been written to the log-directory.
>
> And don't run it as root.
>
> So long....
>
>
> -----Ursprüngliche Nachricht-----
> Von: BMP [mailto:BMP at gmx.de]
> Gesendet: Mittwoch, 12. März 2003 17:53
> An: paul
> Betreff: Re: AW: [bf1942] Loging when Screen is activ
>
> Hello Paul,
>
> i have change it to :
> screen -A -m -d -S BF ./bf1942_lnxded +game CollectionRtR | tee
> /home/BMP/log/bf.log 2>&1
> and now i find the log ;-)
> But the log is EMPTY there is nothing in it. I have connect to the
> Server and disconnect but no entry.
>
>
>
>




More information about the Bf1942 mailing list