I would like to set up LexFloatServer to run as a systemd service on Linux. The documentation effectively says “sort it out yourself”. Does anyone have an example .service file? I presume ExecStart should run LexFloatServer with -config and -productfile arguments, but the docs don’t say. I have no idea if -b is needed or not. None of these combos seem to work. If I could get it to start, what command should ExecStop run?
Regards,
Gary
I figured it out. Quite straightforward actually, I just need a bit of patience. I’ll put detils here in case it helps anyone.
I installed the LexFloatServer executable into /opt/Cryptlex/3.4.8. I put my config and product.dat files in there too. Then I created /etc/systemd/system/lexfloatserver.service as below, and “systemctl start|stop|enable lexfloatserver” work as expected. If enabled, it auto-starts on reboot as desired.
[Unit]
Description=LexFloatServer license server
After=syslog.target network.target
Wants=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/opt/Cryptlex/3.4.8
ExecStart=/opt/Cryptlex/3.4.8/LexFloatServer -config=lexfloat.config -productfile=product.dat -b
[Install]
WantedBy=multi-user.target
Hi Gary,
Glad you figured it out. Instead of passing -b flag you should pass -s flag if you are using systemd.
Regards,
Adnan
Adnan,
When I use -s the service times out and shuts down after a couple of minutes. When I use -b it stays up. This is on Ubuntu 20.04 but the exact distro shouldn’t matter.
Is there a reason why you suggest -s?
Thanks
Gary
Gary,
In case -b is used it self daemonises. If -b works then it’s fine.
Adnan