• 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!

New Developer Project

Holz

New Member
Joined
Mar 2, 2009
Messages
126
Reaction score
0
Hiho Guys,

i want ask the community for a new OT-Restarter-Tool. If the commmunity want a new OT-Restarter-Software i will programm a new one. If someone is interested, he have to do something:

1. What features you want? For Example: "I want a E-mail if the Server was restarted automaticly" or so on...

2. I want a Software for all OS-System (Linux, Windows etc)

Information:
I wont programm something on the Tibia-Server-Software-CODE. For Example: "The Restarter-Software should send a broadcast message In-Game when server will restart soon automaticly" <--Nope :/

So on guys let your feels out.

thx for reading
Holz
 
Bash (Linux, BSD, Solaris)
Code:
cd /path/to/TFS
Run: nano -w mail.txt
<write message here>

Run: nano -w start.sh
#!/bin/bash
cd /path/to/tfs
echo "STARTING OT!"
while true; do
./theforgottenserver 
mail -s "Warning: TFS restarted!" [email protected] < mail.txt
echo "WARNING: OT Restarted!"
done

Any OS (need python installed)
Code:
#!/usr/bin/python
import smtplib, os
from email.mime.text import MIMEText

def send_restart():
   msg = MIMEText("<message>")
   msg['Subject'] = 'Warning: TFS restarted!'
   msg['From'] = "[email protected]"
   msg['To'] = "[email protected]"

   s = smtplib.SMTP()
   s.sendmail("[email protected]", ["[email protected]"], msg.as_string())
   s.quit()

print (">> Server Starting!")
while True:
   os.popen("c:\\path\\to\\theforgottenserver.exe")
   mail_restart()
   print (">> Server restarting")

# Just to prevent window close on windows.
raw_input()
 
It sounds good.

But i want a bid more. I want create a Window for Useres for clicking ...

also i want add some more features as Restart-Server. Like sending E-Mails and so on .

thx for reading
Holz
 
Well, make two threads in the Python script and a call for commands and get the pid, now you can kill it and restart it as you like. :p
 
I opened a new thread in the development section with my idea. Plz look there and write there your ideas down. Thanks.

thx for reading
Holz
 
Back
Top Bottom