Main Contents

L2j, Auto Server Restart

November 24, 2008

This is for Linux and only Linux and will work on more distros (I use Debian Stable).

  1. First you enable telnet on gameserver. Set password, post etc.
  2. You create a file with any name, lets say here: rr_telnet.sh
  3. Write in this file (or copy-paste):
    (echo “password”; sleep 3; echo “shutdown 600″; sleep 3; echo “exit”) | telnet 127.0.0.1 12345
  4. Save the file.
  5. Type: crontab -e
  6. In our example, I restart server every certain days. So I set the script to be executed every day at 23:50
    50 23 * * * /path/to/rr_telnet.sh
  7. Now, every day at 23:50, this script will be executed and shutdown will start with 10 minutes countdown.

Filed under: Linux |

1 Comment

  1. Theoz November 27, 2008 @ 8:34 pm

    Hello, Can you explain what this command exactly does?

Leave a comment

Login