How to Auto Start SFS2X Server on Shutdown

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Sid
Posts: 4
Joined: 12 Feb 2021, 10:19

How to Auto Start SFS2X Server on Shutdown

Postby Sid » 25 May 2021, 06:13

Hi,
I am looking for a solution to auto start my SFS2X server if it shutdowns by any means so that my clients dont get hampered by server unavailability.
please suggest a solution.

I have hosted SFS2X server on a Amazon EC2 instance on Ubuntu 20.04 platform.

regards/
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to Auto Start SFS2X Server on Shutdown

Postby Lapo » 25 May 2021, 10:10

Hi,
you can check the documentation here:
http://docs2x.smartfoxserver.com/Gettin ... tall-linux

The last section shows how to install the server as a service in the background.
In the systemd configuration you have this line:

Code: Select all

Restart=on-abort

You could replace that line (which is the default) with this:

Code: Select all

Restart=on-failure


This will restart the service if it fails for any reason.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 69 guests