From b2f89bdb7365ad70f19f6a6abe362a6937fb19d1 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Tue, 2 Feb 2021 14:23:37 +0100 Subject: [PATCH] first commit --- index.php | 15 ++++++++++++--- statserver_json.sh | 24 ++++++++++++++++++------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 3a1430e..88aaecd 100644 --- a/index.php +++ b/index.php @@ -213,10 +213,19 @@ $sec = "300"; echo $InfoGT[68].$InfoGT[69].$InfoGT[70].$InfoGT[71].$InfoGT[72]; echo "x". $InfoGT[42]. " - x".$InfoGT[55]." "; } - if (count($objlower) > 0) { + +/* if (count($objlower) > 0) { echo $InfoGT[67].$InfoGT[68].$InfoGT[69].$InfoGT[70].$InfoGT[71].$InfoGT[72].$InfoGT[73]; echo "x". $InfoGT[43]. " - x".$InfoGT[56]." "; } +*/ + + if (count($objlower) > 0) { + echo $InfoGT[73].$InfoGT[74].$InfoGT[75].$InfoGT[76].$InfoGT[77].$InfoGT[78]; + echo "x". $InfoGT[47]. " - x".$InfoGT[60]." "; +} + + ?> @@ -244,7 +253,7 @@ $sec = "300";
-
+
HIVE
@@ -466,7 +475,7 @@ $sec = "300";
diff --git a/statserver_json.sh b/statserver_json.sh index ce1ca06..6c12fc9 100755 --- a/statserver_json.sh +++ b/statserver_json.sh @@ -12,14 +12,14 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/dayz/dat # # need to create the directory if dosen't exist an error will appear. -pathd="/path/to/your/website" +pathd="/home/dayz/git-DayZ-server-stat" # create directory varMod="server1" # Game Port IP mod -IpGame="" -PortGame="" -QueryGame="" +IpGame="103.58.149.102" +PortGame="2402" +QueryGame="27017" #CHECKstatserver="/tmp/CHECKstatserver_${varMod}.json" statserver="${pathd}/${varMod}/statserver.json" @@ -46,12 +46,12 @@ DB_NAME="" if [ -d ${pathd}/${varMod} ] then - echo " ✅ Directory ${pathd}/${varMod} exist!" + echo " ✅ Directory ${pathd}/${varMod} ok" else mkdir -p ${pathd}/${varMod} echo " ✅ Directory ${pathd}/${varMod} CREATED ✅" fi -exit 1 + if [ ! -r "$statserver" ]; then echo " ⛔Error:"${statserver}" doesn't exits" @@ -59,7 +59,19 @@ if [ ! -r "$statserver" ]; then fi + +nmapGame=`/usr/local/bin/gamedig --type dayz $IpGame:$QueryGame > ${CHECKstatserver}` +catCHECKstatserver=`cat ${CHECKstatserver}` +if [[ "$catCHECKstatserver" == *error* ]] +then + echo -e " ✅ Game is Down | port $PortGame closed! ⛔ " + insert_mysql_down && echo -e " ✅ Mysql Updated " || echo -e "\n !!!!!!!!!!!!! Huston , MYSQL issue ⛔" +# echo -e "\n Mysql updated" exit 1 +else +echo -e " ✅ Game is UP | port $PortGame OPEN ✅ !\n" +cp ${CHECKstatserver} ${statserver} + ########################## not use