Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-27-2022, 12:04 AM
Gazebeaux
Fire Beetle
 
Join Date: Apr 2021
Location: Chicago, Illinois
Posts: 1
Default How to make a systemd service to start your server after system boot

I'm brand new to Linux and also a stupid idiot with a waste of a brain. But I figured something out, and in my googling I found lots of threads where people asked for help with this but I couldn't find an example that worked for me, so I came up with this:

[Unit]
Description=BoQ server

[Service]
Type=forking
User=boq
Group=users
WorkingDirectory=/home/eqemu/server
ExecStartPre=/bin/sleep 10
ExecStart=/home/eqemu/server/server_start.sh

[Install]
WantedBy=multi-user.target


the 2 most important parts of this for me were type=forking (instead of type=simple)and execstartpre/=/bin/sleep 10. I have no idea wtf forking means but the way I understand it is when you run a script and it keeps running a process in the background but the prompt returns, that requires forking. When I used simple, it ended the process but still reported success in the log because technically it was a success, simple isn't used for processes that keep running (that's how i understand it, could be wrong, don't hurt me)

execstartpre/=/bin/sleep 10 creates a 10 sec delay after booting before it runs the server. It wouldn't work without this for me because it hadn't completed its mySQL connection before it tried running the server.

Don't let Linux scare you. There's more than enough info online to figure it and there are big advantages to using it over windows, for me the primary one being that it's cheaper to rent a server that runs on it lol. Thanks to Akkadius and all who work on EQEmu and thanks to all those who answer questions here and on the discord. Y'all rock.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3