#systemd clarifications
24 messages · Page 1 of 1 (latest)
hi
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?
yeah
I see. Thanks!
In cases I would change the user into root, how will I specify/provide the password?
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?
Understood.
TimeoutStartSec=120 How does this work?
Does it waste 120 seconds before running the execstart?
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
Thank you. Uhh
Restart=always Does this execute only when the service didn't start?
I think so
Got it. About naming the file of the service
Does it always need to have .service as extension?
Thank youuuu! I believe that's all. Thank you for bearing with me.