#/bin/sh ORIGCHANNELS=$(cat ./daroo/channels.txt) if [ "$1" != '' ] && [ "$1" = "quickstart" ] && [ "$2" != '' ];then if [ "$2" -le $ORIGCHANNELS ];then CHANNELS="$2" else exit fi else echo -e "\033[31m Wieviele CHs sollen hochgefahren werden?\033[0m" read CHANNELS fi if [ "$CHANNELS" -gt $ORIGCHANNELS ];then echo -e "\033[31m Zu viele CHs (max $ORIGCHANNELS !)\033[0m" exit fi echo -e "\033[31m Starte DB...\033[0m" cd db ./db & cd .. echo -e "\033[31m Starte Auth...\033[0m" cd auth ./auth & cd .. while [ $CHANNELS -ge 1 ] do echo -e "\033[31m Starte CH "$CHANNELS" ...\033[0m" sleep 1 cd "./channel"$CHANNELS/ ./game & sleep 1 cd .. CHANNELS=$(( $CHANNELS-1 )) sleep 1 done echo -e "\033[31m Starte game99...\033[0m" cd ./game99 ./game & cd .. sleep 4 echo -e "\033[31m Server ist hoch!\033[0m"
cd "./channel"$CHANNELS/
Can not open [CONFIG]
#!/bin/sh
CHANNELS=$(cat ./daroo/channels.txt)
while [ $CHANNELS -ge 1 ]
do
echo -e "\033[31m Stoppe CH "$CHANNELS" ...\033[0m"
cd "./channel"$CHANNELS && sh shut.sh
cd ..
cd "./channel"$CHANNELS && sh shut2.sh
cd ..
cd "./channel"$CHANNELS && sh shut3.sh
cd ..
CHANNELS=$(( $CHANNELS-1 ))
done
echo -e "\033[31m Stoppe game99...\033[0m"
cd game99 && sh shut.sh
cd ..
echo -e "\033[31m Stoppe Auth...\033[0m"
cd auth && sh shut.sh
cd ..
echo -e "\033[31m Stoppe DB...\033[0m"
cd db && sh shut.sh
cd ..
Stoppe CH 2 ... server is not running. server is not running. server is not running. Stoppe CH 1 ... server is not running. server is not running. server is not running. Stoppe game99... kill: 1143: No such process Stoppe Auth... kill: 1209: No such process Stoppe DB... server is not running.
Quote:
echo -e "\033[35m
Was moechtest du tun? \n
1 - (1) Server/Channel starten\n
2 - (2) Server/Channel schliessen\n
3 - (3) Logs loeschen\n
4 - (4) Quests reloaden\n
5 - (5) Nichts
Panel by Fliege"
read anzahl
case $anzahl in
1*)
echo -e "\033[32m Startet die Datenbank ..\033[33m"
cd /usr/home/game/Datenbank && ./db &
sleep 2
cd /usr/home/game/Channel1/Kern1 && ./auto.sh &
sleep 2
cd /usr/home/game/Channel1/Kern2 && ./auto.sh &
sleep 2
cd /usr/home/game/Channel1/Kern3 && ./auto.sh &
sleep 2
cd /usr/home/game/Channel1/Reiche && ./auto.sh &
sleep 2
cd /usr/home/game/Neutraler_Channel && ./auto.sh &
sleep
cd /usr/home/game/Loginserver && ./auto.sh &
sleep 2
echo -e "\033[32m Der Loginserver wurde gestartet.\n
\n
Serverstarter by Fliege\033[33m"
cd ..
;;
2*)
killall -9 db game sh
echo -e "\033[31m Der Server wurde heruntergefahren.\033[0m"
cd ..
;;
3*)
#!/bin/sh
echo "Loesche Logs..."
cd /usr/home/game/Datenbank
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f db.core
cd ..
cd /usr/home/game/Loginserver
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel1/Kern1
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel1/Kern2
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel1/Kern3
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel1/Reiche
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel2/Kern1
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel2/Kern2
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel2/Kern3
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel2/Reiche
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel3/Kern1
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel3/Kern2
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel3/Kern3
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel3/Reiche
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel4/Kern1
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel4/Kern2
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel4/Kern3
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Channel4/Reiche
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
cd /usr/home/game/Neutraler_Channel
rm -f syserr && rm -f syslog
rm -rf log/*
rm -f sh.core
rm -f game.core
rm -f PTS
cd ..
echo "Geloescht!"
;;
4*)
cd /usr/home/game/quest && python make.py
cd ..
;;
5*)
cd ..
;;
esac
Änder dir das ab, ist einfacher zu verstehen. (Musst das auto.sh umändern zu game)
: bad variable name : not found manage.sh: 10: Syntax error: expecting "in"