plugin do restaru serwa
Casio
15.04.2010
witam. szukam pluginu albo raczej skryptu, dzięki ktoremu serwer podczas crasha wlaczy sie sam np w ciagu 10s. dzięki za pomoc
hardbot 15.04.2010
Serwer sam w sobie ma coś takiego że po kilku sekundach po crashu się sam włącza
PS: na czym stoi twój serwer??
PS: na czym stoi twój serwer??
Casio
15.04.2010
No to jesteś w błędzie. Nie każdy serw ma coś takiego:) a wiem, że są jakieś pliki albo coś podobnego, że podnosi serw:) na jednym serwie mam tak, a na drugim w razie crashu muszę sam go włączać. Wiec wie ktoś jak to zrobić?Serwer sam w sobie ma coś takiego że po kilku sekundach po crashu się sam włącza
PS: na czym stoi twój serwer??
Knopers
16.04.2010
Jeśli masz na hostingu jakimś to nie zrobisz tego bo nie dadzą ci dostępu do shella , jeśli masz na dedyku/vps i masz dostęp do shella to możesz uruchomić takie coś :
while test 1 -eq 1 do dalas=`ps uc |grep hlds_run |awk '{print $2}'` peder=`ps uc |grep hlds_i686 |awk '{print $2}'` if test ! -z $peder then sleep 15 else if test ! -z $dalas then kill $dalas else if test -f hlds_run then `screen -A -m -d ./hlds_run -binary ./hlds_i686 -game cstrike +port 27017 +ip xxx.xxx.xxx.xxx +maxplayers 20 +map fy_pool_day` else cd diablo if test -f hlds_run then `screen -A -m -d ./hlds_run -binary ./hlds_i686 -game cstrike +port 27017 +ip xxx.xxx.xxx.xxx +maxplayers 20 +map fy_snow` fi fi fi fi done
mgr inż. Pavulon
16.04.2010
Wejdź na FTP => skopiuj plik do siebie z głównego katalogu => spakuj go => wyślij na forum...
Casio
17.04.2010
dobra, w zalaczniki jest
Użytkownik Casio edytował ten post 17.04.2010 07:31
Załączone pliki
Użytkownik Casio edytował ten post 17.04.2010 07:31
mgr inż. Pavulon
17.04.2010
run() { # Runs the steam update and server # Loops if RESTART is set # Debugs if server failure is detected # Note: if RESTART is not set then # 1. DEBUG is set then the server is NOT exec'd # 2. DEBUG is not set the the server is exec'd if test -n "$RESTART" ; then echo "Auto-restarting the server on crash" #loop forever while true do # Update if needed update # Run the server $HL_CMD retval=$? if test $retval -eq 0 && test -z "$AUTO_UPDATE"; then break; # if 0 is returned then just quit fi debugcore $retval echo "`date`: Server restart in $TIMEOUT seconds" # don't thrash the hard disk if the server dies, wait a little sleep $TIMEOUT done # while true else # Update if needed update # Run the server if test "$DEBUG" -eq 0; then # debug not requested we can exec exec $HL_CMD else # debug requested we can't exec $HL_CMD debugcore $? fi fi }Jeżeli w linii startowej nie masz parametru "-norestart" to serwer powinien zostać uruchomiony automatycznie po crashu.
Potwierdzeniem tego jest "Auto-restarting the server on crash" w konsoli serwera podczas uruchamiania. Masz taką informację u siebie ?
Jeżeli tak się nie dzieje to może być to wina hostingu.