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.
|
Found this little tip, not sure if it works.
https://www.itechlounge.net/2017/10/...l-in-debian-9/ |
Same thing. The server starts and then shuts itself down.
|
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 |
Quote:
@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 |
Yeah...I noticed that issue as well so I put it in the shell script instead.
|
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.
|
So none of this stuff here worked for you? Because it worked for me on the latest Debian.
|
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 |
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?
|
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.
|
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 Code:
[Unit] 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. |
All times are GMT -4. The time now is 02:20 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.