#systemd clarifications

24 messages · Page 1 of 1 (latest)

lavish thistle
#

Hello!

#

@proper sky Hello. Can you see this post? 🙂

proper sky
#

hi

lavish thistle
#

Sorry I had to create a new thread. Nothing to worry sir, I'll be quick as I can.

#

So I am trying to launch a Minecraft server on boot. I just needed to clarify the terms used completely.

#
Description=Minecraft Server
Wants=network-online.target
After=network-online.target

[Service]
WorkingDirectory=/opt/mcserver
User=novembersky
Type=forking

TimeoutStartSec=120
ExecStartPre=/usr/bin/interval %i
ExecStart=some code

ExecStop=some code
#

Is the After like a while code?

#

I mean, will it proceed with the next lines once the network-online.target is true?

proper sky
#

yeah

lavish thistle
#

I see. Thanks!

In cases I would change the user into root, how will I specify/provide the password?

proper sky
#

if it's a system service then you don't need to provide the password

#

if it's a user service then I don't think you can change the user?

lavish thistle
#

Understood.

#

TimeoutStartSec=120 How does this work?

#

Does it waste 120 seconds before running the execstart?

proper sky
#

I'm not sure, would have to check the documentation. it sounds like something that would give time between launches if it failed? or time until deciding whether it failed or not? dunno

lavish thistle
#

Thank you. Uhh

#

Restart=always Does this execute only when the service didn't start?

proper sky
#

I think so

lavish thistle
#

Got it. About naming the file of the service

#

Does it always need to have .service as extension?

proper sky
#

well some aren't a service so I guess

lavish thistle
#

Thank youuuu! I believe that's all. Thank you for bearing with me.