• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OpenTibia Linux Restarter

klekSu

Stroke my ego.
Joined
Nov 4, 2008
Messages
1,285
Reaction score
18
Hello otlanders!

Let me present you a simple linux restarter script for your servers.

1. First of all install screen, for example in Debian by typing this -> apt-get install screen, then create following files.

2. File /etc/init.d/ots_restarter
Code:
#! /bin/bash

screen -A -m -d -S otsScreenName /etc/init.d/ots_restarter_script

3. File /etc/init.d/ots_restarter_script
Code:
#!/bin/bash
while [ 1 ]; do
  cd /home/otsFolder
  echo "Restarting Ots"
  su userNotRoot -c ./theforgottenserver
done
4. Change otsScreenName to any name you wish.
5. Change userNotRoot to your linux user name other than main administrator root.
6. Now you can run your ot by typing /etc/init.d/ots_restarter and you can see how it works by typing screen -r ots, remember do NOT hit ctrl+c because that will restart your screen such as your ots. To quit screen but keep it running hit ctrl+a+d.
 
Thread approved.
 
update-rc.d ots_restarter defaults
if you use this command then you add script to start on reboot system
 
Back
Top