←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

plugin do restaru serwa

Zablokowany

  • +
  • -
Casio - zdjęcie 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
Odpowiedz

hardbot - zdjęcie hardbot 15.04.2010

xD Serwer sam w sobie ma coś takiego :] że po kilku sekundach po crashu się sam włącza xD
PS: na czym stoi twój serwer??
Odpowiedz

  • +
  • -
ZioMek01 - zdjęcie ZioMek01 15.04.2010

przyłączam się ja mam na gamesol i sam się nie włącza:/
Odpowiedz

  • +
  • -
Casio - zdjęcie Casio 15.04.2010

xD Serwer sam w sobie ma coś takiego :] że po kilku sekundach po crashu się sam włącza xD
PS: na czym stoi twój serwer??

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ć?
Odpowiedz

  • +
  • -
Knopers - zdjęcie 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
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 16.04.2010

Casio, a pokaż swój hlds_run ;)
Odpowiedz

  • +
  • -
Casio - zdjęcie Casio 16.04.2010

tzn jak to zrobic?:D
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 16.04.2010

Wejdź na FTP => skopiuj plik do siebie z głównego katalogu => spakuj go => wyślij na forum...
Odpowiedz

  • +
  • -
Casio - zdjęcie Casio 17.04.2010

dobra, w zalaczniki jest :)

Załączone pliki

  • Załączony plik  hlds.rar   3,59 KB   39 Ilość pobrań

Użytkownik Casio edytował ten post 17.04.2010 07:31
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie 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.
Odpowiedz
Zablokowany