Jump to content

Script auto start!


Recommended Posts

Hola aqui les dejo este script de auto start del servidor y borrado de logs.

 

Como se instala.

Metemos este archivo en cd /home/game/channel1

Cd/home/game/chanel2

y game99

 

Cambiamos de nombre al script start.sh que esta en cd /home/game y le ponemos auto.sh

y listo.

 

Deven ponerle auto.sh

 

#!/bin/sh
# Default flags to pass to the MUD server (see admin.txt for a description
# of all flags).
#############################################################################

SERVER_NAME=./game1_2

while ( : ) do

  DATE=`date`
  echo "autogame starting game $DATE" >> syslog
  echo "running" $SERVER_NAME >> syslog

#  cp -f $SERVER_NAME $SERVER_NAME.current
  $SERVER_NAME

  rm cores/core.1
  mv cores/core.2 cores/core.1
  mv cores/core.3 cores/core.2
  mv cores/core.4 cores/core.3
  mv cores/core.5 cores/core.4
  mv cores/core.6 cores/core.5
  mv $SERVER_NAME.core cores/core.6

  if [ ! -r .fastboot ]; then
    sleep 3
  else
    rm .fastboot
    sleep 3
  fi

  if [ -r .killscript ]; then
    DATE=`date`;
    echo "autoscript killed $DATE"  >> syslog
    rm .killscript
    exit
  fi

  while [ -r pause ]; do
    sleep 60
  done

done

Creditos: diper, collado, supremekill.

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...