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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2018, 05:00 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default Debian Server Start On Boot

Can anyone tell me how to get the server_start_with_login.sh to start at bootup? I tried the cron method, and there is no rc.local on Debian anymore. I tried doing systemd but all of these methods seem to start the server and then it shuts itself down.
Reply With Quote
  #2  
Old 08-15-2018, 05:23 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Found this little tip, not sure if it works.
https://www.itechlounge.net/2017/10/...l-in-debian-9/
Reply With Quote
  #3  
Old 08-15-2018, 06:20 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default

Same thing. The server starts and then shuts itself down.
Reply With Quote
  #4  
Old 08-15-2018, 06:58 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default

I finally got it working by putting the below in my crontab. I am not sure if I need the delay...or to direct the output to NULL. I tried to delay it in various ways during my trial and error without success though, so maybe the redirected output? Oh well...just glad it is working.

Code:
@reboot sleep 30 && /home/eqemu/server/server_start_with_login.sh > /dev/null 2>&1
Reply With Quote
  #5  
Old 08-15-2018, 07:49 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by djeryv View Post
I finally got it working by putting the below in my crontab. I am not sure if I need the delay...or to direct the output to NULL. I tried to delay it in various ways during my trial and error without success though, so maybe the redirected output? Oh well...just glad it is working.

Code:
@reboot sleep 30 && /home/eqemu/server/server_start_with_login.sh > /dev/null 2>&1
Hey djeryv! A name I've not seen in quite a while, hope all is well.

@reboot in the crontab works fine, you really don't need the delay.

However, I would recommend that you first cd into the server directory because running the server binaries and everything it loads is contextual of the server directory. So:

Code:
@reboot cd /home/eqemu/server && ./server_start_with_login.sh > /dev/null 2>&1
Reply With Quote
  #6  
Old 08-15-2018, 08:19 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default

Yeah...I noticed that issue as well so I put it in the shell script instead.
Reply With Quote
  #7  
Old 08-17-2018, 05:09 PM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

Wow I have been asking this question for 5 years with no answer and tried some of those things you did, but never got it to work.
Reply With Quote
  #8  
Old 08-17-2018, 08:17 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default

So none of this stuff here worked for you? Because it worked for me on the latest Debian.
Reply With Quote
  #9  
Old 08-17-2018, 10:08 PM
jakaleca's Avatar
jakaleca
Fire Beetle
 
Join Date: Oct 2012
Posts: 16
Default

Greetings, Djeryv

You have been deeply missed by many of us around here. There have been many requests for your old solo server files over the years, and innumerable attempts to recreate a fun "legit" solo type server, with widely-varied results.

Here's hoping you are well and prosperous.

Best Regards
Reply With Quote
  #10  
Old 08-18-2018, 10:02 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

I had been learning linux at the time and its been a while since I have loaded up an EQEMU on linux. I moved to windows since one of the things was not being able to get it to auto start on a reboot. I am a newbie at linux! When crontab is mentioned, where is that?
Reply With Quote
  #11  
Old 08-18-2018, 05:52 PM
djeryv
Hill Giant
 
Join Date: Apr 2008
Posts: 234
Default

usually you just type "crontab -e" to edit it. When you do this for the first time, it will ask you what editor you are going to use to edit it.
Reply With Quote
  #12  
Old 03-21-2019, 06:28 PM
timber28
Fire Beetle
 
Join Date: Feb 2009
Location: florida
Posts: 1
Default

Here is a tad better way to do it (I try to avoid doing stuff like this in cron), if you want to be able to control it with systemctl.

Edit the server_start script you want to use and server_stop.sh and add a cd /home/eqemu/server (or wherever you installed it) as the 2nd line.

Code:
#!/usr/bin/env bash
cd /home/eqemu/server
Then create this in /etc/systemd/system as eqemu.service
Code:
[Unit]
Description=EQ Emulator Server with Login server
After=mysql.service

[Service]
User=eqemu
Group=eqemu
Type=forking
ExecStart=/home/eqemu/server/server_start_with_login.sh
ExecStop=/home/eqemu/server/server_stop.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target
Then run systemctl daemon-reload
This will let you see the status of the service with systemctl status eqemu, and you can start/stop the server with the normal start/stop commands.

Don't forget to systemctl enable eqemu to enable it starting at boot.
Reply With Quote
Reply


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 12:24 PM.


 

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