Need Ubuntu Autorestart script for my Server.

Lejo
Member
 
Posts: 92
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Need Ubuntu Autorestart script for my Server.

by Lejo » Tue Apr 12, 2016 11:48

Problem detached!
I need a script to restart my server "Subgames for all!" after a shut down.
The Version of ubuntu is 16.04 LTS.
In the moment I start the server with this command:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest --server --worldname Subgames

The Port is 30001 and the server don't need to shutdown regularly.
Can I place the script everywhere or must be it in a special order?

Please help me to restart the Server automatic.
Thanks.
Last edited by Lejo on Sun May 08, 2016 12:20, edited 3 times in total.
Enjoy my Minigameserver Subgames for all!
https://forum.minetest.net/viewtopic.php?f=10&t=14480
 

Lejo
Member
 
Posts: 92
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Need Ubuntu Autorestart script for my Server.

by Lejo » Tue Apr 12, 2016 11:51

I need a script to restart my server "Subgames for all!" after a shut down.
The Version of ubuntu is 16.04 LTS.
In the moment I start the server with this command:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest --server --worldname Subgames

The Port is 30001 and the server don't need to shutdown regularly.
Can I place the script everywhere or must be it in a special order?

Please help me to restart the Server automatic.
Thanks.
Last edited by Lejo on Sun May 08, 2016 12:20, edited 2 times in total.
Enjoy my Minigameserver Subgames for all!
https://forum.minetest.net/viewtopic.php?f=10&t=14480
 

cheapie
Member
 
Posts: 304
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Need Ubuntu Autorestart script for my Server.

by cheapie » Mon Apr 25, 2016 08:20

If all you want is for it to start back up when it shuts down, try this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
while true; do minetest --server --worldname Subgames; done
 

Lejo
Member
 
Posts: 92
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Need Ubuntu Autorestart script for my Server.

by Lejo » Mon Apr 25, 2016 16:49

cheapie wrote:If all you want is for it to start back up when it shuts down, try this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
while true; do minetest --server --worldname Subgames; done

I will try it thanks. :)
Enjoy my Minigameserver Subgames for all!
https://forum.minetest.net/viewtopic.php?f=10&t=14480
 

Lejo
Member
 
Posts: 92
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Need Ubuntu Autorestart script for my Server.

by Lejo » Mon Apr 25, 2016 17:01

Thanks a lot. :)
Enjoy my Minigameserver Subgames for all!
https://forum.minetest.net/viewtopic.php?f=10&t=14480
 

DI3HARD139
Member
 
Posts: 144
Joined: Sat Oct 18, 2014 21:04
GitHub: DI3HARD139
IRC: DI3HARD139
In-game: DI3HARD139 DI3HARD139_

Re: Need Ubuntu Autorestart script for my Server.

by DI3HARD139 » Thu Apr 28, 2016 05:36

Create a .sh file to be used as a starting point then copy the code into it and save. I suggest storing in your home directory so you don't have to cd to get to it. Then just do ctrl+alt+T ./<scriptname>.sh
Credits to VanessaE
https://forum.minetest.net/viewtopic.php?id=4604

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
while true
   do
   sleep 1
   minetest --server \
      --config <dir to minetest.conf for server> \
      --worldname <WorldNameHere> \
      --port <ServerPortHere>\
      --logfile <Dir to debug.txt>
done
Servers: mt.rrhgameservers.ml = [RRH] MT-Creative (48250), RRH-Survival (48253), Unknown (48255), Minetest City (48262)
Specs = Intel Core i5-3570s 16GB DDR3 2TB HDD, Ubuntu Server 16.04.1 x64 XFCE
------------------------------------------------------------
System: Lenovo Thinkstation S30 = Intel Xeon E5-2665, 20GB DDR3 (1333MHz Non-ECC), Gigabyte GTX1060 6GB, 3.5TB Storage, Win 10 Pro x64.
 

Lejo
Member
 
Posts: 92
Joined: Mon Oct 19, 2015 16:32
GitHub: Lejo1
In-game: Lejo

Re: Need Ubuntu Autorestart script for my Server.

by Lejo » Thu Apr 28, 2016 17:23

Thanks again but I have still a script from: cheapie
It works fine.
But thanks too.
Enjoy my Minigameserver Subgames for all!
https://forum.minetest.net/viewtopic.php?f=10&t=14480
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Need Ubuntu Autorestart script for my Server.

by rubenwardy » Thu Apr 28, 2016 19:43

The second script is better as it will stop / slow down a crash loop from filling up a folder and potentially crashing the OS.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 9 guests

cron