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 06-10-2015, 04:57 PM
Yummy
Sarnak
 
Join Date: Feb 2014
Posts: 71
Default systemctl startup/shutdown script

Does anyone have an example of a systemd startup and shutdown script?

Fedora/CentOS move from sys-v to systemd has left me feeling a bit lost.

Thank you
Reply With Quote
  #2  
Old 08-10-2015, 06:36 PM
Flopz
Fire Beetle
 
Join Date: May 2007
Posts: 13
Default

Here are what I'm using for mine

Code:
# cat /usr/lib/systemd/system/eqemu-world.service 
[Unit]
Description=EQ Emulator World server
After=network.target

[Service]
Type=simple
User=eq
Group=users
WorkingDirectory=/home/eq/server
ExecStartPre=/home/eq/server/shared_memory
ExecStart=/home/eq/server/world

[Install]
WantedBy=multi-user.target
Code:
# cat /usr/lib/systemd/system/eqemu-zones.service 
[Unit]
Description=EQ Emulator Zone server
After=network.target
After=eqemu-world.service
Requires=eqemu-world.service

[Service]
Type=simple
User=eq
Group=users
WorkingDirectory=/home/eq/server
ExecStart=/home/eq/server/eqlaunch zone

[Install]
WantedBy=multi-user.target
EDIT: This is on CentOS 7. I'd imagine would work fine on Fedora without modifying (beyond changing the paths, that is)

Last edited by Flopz; 08-10-2015 at 06:37 PM.. Reason: Added OS
Reply With Quote
  #3  
Old 08-19-2015, 11:55 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

Would this work on Ubuntu? And how is the service called at bootup?

I have systemd with systemd-shim.list, but the directory structure in the above scripts are different.
Reply With Quote
  #4  
Old 09-06-2015, 05:48 PM
Yummy
Sarnak
 
Join Date: Feb 2014
Posts: 71
Default

Quote:
Originally Posted by Flopz View Post
Here are what I'm using for mine
Thank you! I will give it a go and let you know the results.
Reply With Quote
  #5  
Old 09-06-2015, 08:19 PM
Yummy
Sarnak
 
Join Date: Feb 2014
Posts: 71
Default

Quote:
Originally Posted by Flopz View Post
Here are what I'm using for mine
I had to make some minor changes but your examples were perfect as a starting point. You saved me hours and hours. Thank you!

For Fedora 22, I chose to create five systemd scripts. The those unfamiliar with the process, I have provided details here https://blog-harmonson.rhcloud.com/2...erver-minimal/ under the section titled Systemd Scripts.


eqemu-loginserver.service
Code:
[Unit]
Description=EQ Emulator Login server
After=mysqld.service
Requires=mysqld.service

[Service]
Type=simple
User=eqadmin
Group=users
WorkingDirectory=/home/eqadmin/eqemu/server
ExecStart=/home/eqadmin/eqemu/server/loginserver

[Install]
WantedBy=multi-user.target

eqemu-world.service
Code:
[Unit]
Description=EQ Emulator World server
After=eqemu-loginserver.service
Requires=eqemu-loginserver.service

[Service]
Type=simple
User=eqadmin
Group=users
WorkingDirectory=/home/eqadmin/eqemu/server
ExecStartPre=/home/eqadmin/eqemu/server/shared_memory
ExecStart=/home/eqadmin/eqemu/server/world

[Install]
WantedBy=multi-user.target
eqemu-queryserv.service
Code:
[Unit]
Description=EQ Emulator Query server
After=eqemu-world.service
Requires=eqemu-world.service

[Service]
Type=simple
User=eqadmin
Group=users
WorkingDirectory=/home/eqadmin/eqemu/server
ExecStart=/home/eqadmin/eqemu/server/queryserv

[Install]
WantedBy=multi-user.target
eqemu-ucs.service
Code:
Unit]
Description=EQ Emulator UCS server
After=eqemu-queryserv.service
Requires=eqemu-world.service

[Service]
Type=simple
User=eqadmin
Group=users
WorkingDirectory=/home/eqadmin/eqemu/server
ExecStart=/home/eqadmin/eqemu/server/ucs

[Install]
WantedBy=multi-user.target
eqemu-zones.service
Code:
[Unit]
Description=EQ Emulator Zone server
After=eqemu-ucs.service
Requires=eqemu-world.service

[Service]
Type=simple
User=eqadmin
Group=users
WorkingDirectory=/home/eqadmin/eqemu/server
ExecStart=/home/eqadmin/eqemu/server/eqlaunch zone

[Install]
WantedBy=multi-user.target
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 03:47 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