Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

looking for a unix script to check dedi server status

Featured Replies

Опубликовано:

Hi, as you know, dedi server will hang eventually after a few days/weeks, for IW4M I had a nice rcon php script to check server through rcon and if not responding, restart the server via pkill...

but for IW5M, I can not find such script to issue any rcon command...

I don't want to install B3 and all extra stuff, just want to be able to do a simple rcon gametype via a script...

Is it possible??

 

#!/bin/bash

HOST=localhost
PORT=28960
RCONPASSWD=mypassword
SERVER=./restart-tdm1.sh
CHECKER=./rcon/rconcmd.php

while true; do
RES1=''
RES2=''
RES3=''

RES1=$(php $CHECKER "--ip="$HOST "--port="$PORT "--password="$RCONPASSWD "--command=g_gametype")
sleep 10;

RES2=$(php $CHECKER "--ip="$HOST "--port="$PORT "--password="$RCONPASSWD "--command=g_gametype")
sleep 10;

RES3=$(php $CHECKER "--ip="$HOST "--port="$PORT "--password="$RCONPASSWD "--command=g_gametype")
sleep 10;

if [ -z "$RES1" ]; then
if [ -z "$RES2" ]; then
if [ -z "$RES3" ]; then
echo
echo "Server is down, restarting"
date
echo
echo
$SERVER &
fi
fi
fi

sleep 60;
done

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.