RSSy MYGO.pl Opublikowano Kwiecień 2, 2018 o 19:53 RSSy Udostępnij Opublikowano Kwiecień 2, 2018 o 19:53 Descriptionlinux is the operating system of choice when using this plugin. This plugin basically only shuts down your server after all players disconnect or every 2 hours (to keep i refreshed). It requires that you use a seperate cronjob & restart shell script to reboot the server. Other games can use the server command "_restart" to restart their game engine but it doesn't work on L4D2, so that's why we set up the configuration in this way. Recommended cron job & auto-restart.sh script:Cron job: Code: # Automatically reboot the server if it goes down * * * * * /path/to/auto-restart.sh auto-restart.sh Note: * Assumes the name of the screen session is "left4dead2_server" and your bootup script is named "start.sh" * Need to edit "/path/to/start.sh" PHP Code: #!/bin/bash alive=`ps ux | grep 'left4dead2_server' | wc -l | awk '{ print $1 }'` if [ $alive -lt 2 ]; then echo "First Check: l4d2 server offline." sleep 3s alive2=`ps ux | grep 'left4dead2_server' | wc -l | awk '{ print $1 }'` if [ $alive2 -lt 2 ]; then echo "Second Check: l4d2 server still offline." sleep 3s alive3=`ps ux | grep 'left4dead2_server' | wc -l | awk '{ print $1 }'` if [ $alive3 -lt 2 ]; then echo "Third Check: Starting l4d2 server..." sleep 2s /path/to/start.sh else echo "Third Check: L4D2 server already active. Terminating.." sleep 3s fi else echo "Second Check: L4D2 server already active. Terminating.." sleep 3s fi else echo "First Check: L4D2 server already active. Terminating.." sleep 3s fi Install Put .smx file in addons/sourcemod/plugins Attached Files L4D2 Server Restarter.smx (5.4 KB) Get Plugin or Get Source (L4D2_ServerRestarter.sp - 5.7 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się