systemd file to start hserver

   1055   0   0
User Avatar
Member
1 posts
Joined: June 2017
Offline
Hi,

I'm having a problem passing 2 license servers to the systemd startup scripts (on Centos/Redhat 7). Was hoping someone has been down this road already, I've spun my wheels on it for about an hour or so.

From the command line we can start and pass multiple servers with the below:

/opt/sesi/current/bin/hserver -S “10.9.8.7;192.168.4.4”
And this will set the two license servers as expected, verified with the hserver -l output:

root@lnx-greg# /opt/sesi/current/bin/hserver -l | grep ^L
License Server: 10.9.8.7;192.168.4.4

But I'd like this done at system boot using systemd.

Tried a variety of things without much success. Has anyone done this? I want systemd to have control of the process so would rather not reference a wrapper script if possible.

Last effort was similar to the below:

in unit file:
EnvironmentFile= /etc/hserver.envrioment
ExecStartPre= /opt/sesi/current/bin/hserver
ExecStart= /opt/sesi/current/bin/hserver $ARG1 $ARG2

in the enviromentfilefile:
ARG1=-S
ARG2=\“10.9.8.7;192.168.4.4\”
(tried without escaping the quotes too, also tried replacing the ; with a , (found conflicting data on the support site here as to which is required)

thanks for your time,
-g
  • Quick Links