Need help making a program/script auto restart

First of all i'd like to say that i know absolutely nothing about linux. Linode is my first attempt (gotta start somewhere!) thus i may need some detailed/"walkthrough" type of answers if possible!

Basically i use Linode to host a game server (Unturned), and nowhere on the web could i find a plugin for that game that allows my server to restart.

Thus i'd like to know if there's a way for me to create a script or something that would automatically close then restart my game server. If that matters, the command that i use to start my server after landing in the correct directory is:
"./ServerHelper.sh -Port/27015+SecureServer/leserveur".
To shutdown it, i simply type "shutdown" in the console.

I have direct access to the storage through VNC/filezilla if that matters aswell.

Thank you!

1 Reply

First of all i'd like to say that i know absolutely nothing about linux.

Well, I'm glad you got that out of the way ;-)

Thus i'd like to know if there's a way for me to create a script or something that would automatically close then restart my game server.

There is a way to do this but required method requires lots of inside knowledge about how system services are (re-)spawned.

To shutdown it, i simply type "shutdown" in the console.

Do you know if there's a way to do this from outside the console? If not, that's going to be a big hurdle.

The first question I would ask myself is "Why do I need a game server to be running if I'm not using it?".

My suggestion would be to learn something about Linux, the shell, shell scripts, etc before you attempt your project. Most of us could do what you want straightaway with little effort but it would take forever to explain it to you in a forum such as this.

I don't want to come off as snobbish or snooty to someone who's trying to learn…that's not my intent. I'm only trying to be practical. Without some expertise on your part, what you want is going to be nigh on impossible for one (or more) of us to coach you to do by remote control.

That being said, Linode has a Professional Services division that specializes in stuff like this. I have no idea how much their services cost (and they will cost). You might try contacting them:

https://www.linode.com/products/pro-services/

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct