Register for your free account! | Forgot your password?

You last visited: Today at 06:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Corerestart

Discussion on Corerestart within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2012
Posts: 15
Received Thanks: 4
Corerestart

Huhu

da bei meinem Server immer die Channels abkratzten & ich nicht immer @home bin

habe ich folgendes Restart-Script von Aiir gefunden

Habe es für mein Srv angepasst, habe jeweils pro Channel 1 Core, eher gesagt der Channel ist ein Core.. xD sorry für die Ausdrucksweise :P

PHP Code:
#!/bin/sh

GAMEDIR="/home/game"
LOG="$GAMEDIR/corerestart.log"

PIDAUTH=`ps aux | grep auth | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDAUTH!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: AUTH SERVER IST OKAY! PID: $PIDAUTH>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der Auth (Login-Server) ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Auth (Login-Server) ..." >> $LOG
cd $GAMEDIR
/auth && ./auth
fi

PIDDB
=`ps aux | grep db | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDDB!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: DB CORE IST OKAY! PID: $PIDDB>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S`:: Der DB Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte DB Core & den rest des Servers ..." >> $LOG
cd $GAMEDIR
/db && ./db
cd $GAMEDIR
/auth && ./auth
cd $GAMEDIR
/channel1/first && ./first
fi

PIDFIRST
=`ps aux | grep first | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDFIRST!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: FIRST CORE IST OKAY! PID: $PIDFIRST>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der FIRST Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte FIRST Core ..." >> $LOG
cd $GAMEDIR
/channel1/first && ./first

fi

PIDGAME1
=`ps aux | grep game1_1 | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDGAME1!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: GAME1_1 CORE IST OKAY! PID: $PIDGAME1>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der GAME1_1 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte GAME1_1 Core ..." >> $LOG
cd $GAMEDIR
/channel1/game1 && ./game1_1

fi

PIDGAME2
=`ps aux | grep game1_2 | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDGAME2!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: GAME1_2 CORE IST OKAY! PID: $PIDGAME2>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der GAME1_2 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte GAME1_2 Core ..." >> $LOG
cd $GAMEDIR
/channel1/game2 && ./game1_2

fi

PIDGAME3
=`ps aux | grep game1_3 | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDGAME3!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S` :: GAME1_3 CORE IST OKAY! PID: $PIDGAME3>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der Game1_3 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Game1_3 Core ..." >> $LOG
cd $GAMEDIR
/channel1/game3 && ./game1_3

fi

PIDGAME4
=`ps aux | grep game1_4 | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDGAME4!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S`:: GAME1_4 CORE IST OKAY! PID: $PIDGAME4>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der Game1_4 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Game1_4 Core ..." >> $LOG
cd $GAMEDIR
/channel1/game4 && ./game1_4

fi

PIDGAME99
=`ps aux | grep game99 | grep -v grep | awk '{print $2;}'`
if [ 
"x$PIDGAME99!= "x" ];
then
echo "`date +%d.%m.%Y-%H:%M:%S`::  GAME99 CORE IST OKAY! PID: $PIDGAME99>> $LOG
else
echo 
"`date +%d.%m.%Y-%H:%M:%S` :: Der Game99 Core ist abgestürzt" >> $LOG
echo "`date +%d.%m.%Y-%H:%M:%S` :: Starte Game99 Core ..." >> $LOG
cd $GAMEDIR
/game99 && ./game99
fi 
Wollte euch mal Fragen ob das alles in Ordnung ist. Ob alles so sein sollte damit später keine weitere Probleme entstehen.. ^^

danke für die Antworten
Rechtsklick is offline  
Old 06/20/2012, 19:54   #2
 
.Zox™'s Avatar
 
elite*gold: 5
Join Date: Jun 2012
Posts: 96
Received Thanks: 55
Jeeeep's ist in Ordnung. (:
.Zox™ is offline  
Thanks
1 User
Old 06/23/2012, 18:41   #3
 
elite*gold: 0
Join Date: Jun 2012
Posts: 15
Received Thanks: 4
Quote:
Originally Posted by .Zox™ View Post
Jeeeep's ist in Ordnung. (:
Mhh alles klar, danke^^
Rechtsklick is offline  
Reply


Similar Threads Similar Threads
[Hilfe] Corerestart Script
07/08/2012 - Metin2 Private Server - 1 Replies
Hallo Com, hab mir mal das Script von Aiir angeschaut und finde es eigentlich ein gutes Release. Habs dann mal an die Gamefiles von Daroo angepasst jedoch bekomme ich immer ein unexpecting then wenn ich es ausführen will. Komischerweise bekomm ich die selbe Fehlermeldung, wenn ich das orginalscript auch benutze. Da ich von Shellprogrammierung nicht all zu viel verstehe wollte ich euch Fragen, ob jmd. den Fehler kennt.



All times are GMT +1. The time now is 06:51.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.