ich habe mal nebenbei versucht ein paar .sh's zu bearbeiten, aber irgendwie kommt mir das Spanisch vor.
Also sind ungefähr so 100 Zeilen Shell Code für ein Logs lösch und Backup Script.
Ist doch nicht normal oder.
Hier mal der Code
PHP Code:
#!/bin/sh
echo "Alle Logs werden gelöscht."
cd /usr/home/game/m2_datenbank && rm -f PTS &
cd /usr/home/game/m2_datenbank && rm -f syserr &
cd /usr/home/game/m2_datenbank && rm -f syslog &
sleep 2
cd /usr/home/game/m2_login && rm -f PTS &
cd /usr/home/game/m2_login && rm -f syserr &
cd /usr/home/game/m2_login && rm -f syslog &
sleep 2
cd /usr/home/game/m2_channel/channel1/core1 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core1 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core1 && rm -f syslog &
cd /usr/home/game/m2_channel/channel1/core2 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core2 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core2 && rm -f syslog &
cd /usr/home/game/m2_channel/channel1/core3 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core3 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core3 && rm -f syslog &
cd /usr/home/game/m2_channel/channel1/core4 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core4 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core4 && rm -f syslog &
cd /usr/home/game/m2_channel/channel1/core5 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core5 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core5 && rm -f syslog &
cd /usr/home/game/m2_channel/channel1/core6 && rm -f PTS &
cd /usr/home/game/m2_channel/channel1/core6 && rm -f syserr &
cd /usr/home/game/m2_channel/channel1/core6 && rm -f syslog &
sleep 2
cd /usr/home/game/m2_channel/channel2/core1 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core1 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core1 && rm -f syslog &
cd /usr/home/game/m2_channel/channel2/core2 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core2 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core2 && rm -f syslog &
cd /usr/home/game/m2_channel/channel2/core3 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core3 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core3 && rm -f syslog &
cd /usr/home/game/m2_channel/channel2/core4 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core4 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core4 && rm -f syslog &
cd /usr/home/game/m2_channel/channel2/core5 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core5 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core5 && rm -f syslog &
cd /usr/home/game/m2_channel/channel2/core6 && rm -f PTS &
cd /usr/home/game/m2_channel/channel2/core6 && rm -f syserr &
cd /usr/home/game/m2_channel/channel2/core6 && rm -f syslog &
sleep 2
cd /usr/home/game/m2_channel/channel3/core1 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core1 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core1 && rm -f syslog &
cd /usr/home/game/m2_channel/channel3/core2 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core2 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core2 && rm -f syslog &
cd /usr/home/game/m2_channel/channel3/core3 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core3 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core3 && rm -f syslog &
cd /usr/home/game/m2_channel/channel3/core4 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core4 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core4 && rm -f syslog &
cd /usr/home/game/m2_channel/channel3/core5 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core5 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core5 && rm -f syslog &
cd /usr/home/game/m2_channel/channel3/core6 && rm -f PTS &
cd /usr/home/game/m2_channel/channel3/core6 && rm -f syserr &
cd /usr/home/game/m2_channel/channel3/core6 && rm -f syslog &
sleep 2
cd /usr/home/game/m2_channel/channel4/core1 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core1 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core1 && rm -f syslog &
cd /usr/home/game/m2_channel/channel4/core2 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core2 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core2 && rm -f syslog &
cd /usr/home/game/m2_channel/channel4/core3 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core3 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core3 && rm -f syslog &
cd /usr/home/game/m2_channel/channel4/core4 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core4 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core4 && rm -f syslog &
cd /usr/home/game/m2_channel/channel4/core5 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core5 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core5 && rm -f syslog &
cd /usr/home/game/m2_channel/channel4/core6 && rm -f PTS &
cd /usr/home/game/m2_channel/channel4/core6 && rm -f syserr &
cd /usr/home/game/m2_channel/channel4/core6 && rm -f syslog &
sleep 2
cd /usr/home/game/m2_game99/core1 && rm -f PTS &
cd /usr/home/game/m2_game99/core1 && rm -f syserr &
cd /usr/home/game/m2_game99/core1 && rm -f syslog &
cd /usr/home/game/m2_game99/core2 && rm -f PTS &
cd /usr/home/game/m2_game99/core2 && rm -f syserr &
cd /usr/home/game/m2_game99/core2 && rm -f syslog &
cd /usr/home/game/m2_game99/core3 && rm -f PTS &
cd /usr/home/game/m2_game99/core3 && rm -f syserr &
cd /usr/home/game/m2_game99/core3 && rm -f syslog &
cd /usr/home/game/m2_game99/core4 && rm -f PTS &
cd /usr/home/game/m2_game99/core4 && rm -f syserr &
cd /usr/home/game/m2_game99/core4 && rm -f syslog &
cd /usr/home/game/m2_game99/core5 && rm -f PTS &
cd /usr/home/game/m2_game99/core5 && rm -f syserr &
cd /usr/home/game/m2_game99/core5 && rm -f syslog &
cd /usr/home/game/m2_game99/core6 && rm -f PTS &
cd /usr/home/game/m2_game99/core6 && rm -f syserr &
cd /usr/home/game/m2_game99/core6 && rm -f syslog &
sleep 2
echo "Alle Logs erfolgreich gelöscht."
echo "Erstelle Sicherung von -Game & -MySQL"
cd /usr/home/game/m2_sicherrung
mkdir `date +%d.%m.%y-%R`
cd `date +%d.%m.%y-%R`
sleep 2
tar cfzv game.tar.gz /usr/home/game
sleep 2
tar cfzv mysql.tar.gz /var/db/mysql
sleep 2
echo "Sicherrung erfolgreich erstellt."
Regards
.Wolowitz