[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can not start a script with systemd



On Sun, Mar 13, 2022 at 10:05:11PM +0200, Alexis Grigoriou wrote:
>  I still get an error and alienarena-ded does not load.

What's the error?

> I forgot to
> mention that the server doesn't run in the background but when loaded
> it stays in it's console.

That's good.  That's what you want.

> I tried all the options you suggested, with
> and without the wrapper script and as exec and forking type.
>  
>  I did like your last approach which I hoped would have worked. It does
> seem more simple to let systemd handle the whole thing. Oh, and one
> more thing, the .cfg file is in a other directory (~/.local/share/cor-
> games/arena) I do believe this has to do with some XDG stuff, but I
> assume that the User=aaserver directive handles that.

If it requires environment variables like HOME to be defined, then you
might need to add those.  Either in the unit file, or in the wrapper
script.

Looks like the systemd version uses an "Environment=" directive, from
systemd.exec(5).  (The hardest part of all this is guessing which man
page each thing is in, because there are at least three separate man
pages -- systemd.unit, systemd.service, systemd.exec.)


Reply to: