[systemd-devel] Syntax check for a new service?

Tom Browder tom.browder at gmail.com
Sat Feb 26 17:05:30 UTC 2022


On Sat, Feb 26, 2022 at 09:38 Dave Howorth <systemd at howorth.org.uk> wrote:

> On Sat, 26 Feb 2022 09:17:38 -0600
> Tom Browder <tom.browder at gmail.com> wrote:
> > Is there any way to get a plain syntax check of a potential new
> > service file?
>
> systemd-analyze verify FILE...


Thanks, Dave.

I'm apparently having problems with the executable file and I'm not sure if
I need
the Type to be simple or oneshot.

The service I'm trying to create is to emulate a user at the CLI executing
a script running in the foreground who never logs out.

The script loops infinitely listening and responding to a specific port
behind an apache reverse proxy. The script is programmed to stop with a
Ctr-C. It can be left with "nohup &" (but I'm not sure if that interferes
with its design yet).

I do know I have to set an environment variable for the executable to find
its libraries, and I'm not sure how to do that in the service file to
emulate this:

    export MYLIB=/path/to/lib; /path/to/prog

I have tried both Type=oneshot and Type=simple but neither like the single
ExecStart= line with that command.

Best regards,

-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220226/421ac6f8/attachment.htm>


More information about the systemd-devel mailing list