We are currently running the agisoft-fls (agisoft-license-server) in a containerized environment and activate a license and start the server like this:
# activate key
./agisoft-fls --activate $ACTIVATION_KEY
# start agisoft floating license server in background
./agisoft-fls --host 0.0.0.0:5842 &
When any problem occurs and the container is terminated we would love to use some sort of lifecycle prestop hook with a command like this:
/agisoft-license-server/agisoft-fls --deactivate metashape-pro
But this only yields
Server is already running on this machine
.
Stopping the agisoft-fls process (e.g.
pkill agisoft-fls
) will not work as this will instantly terminate the running container as agisoft-fls is the init process and will not deactivate the license correctly.
Is there any way to make it possible to deactivate the license with a running agisoft-fls in the background?
Why is activating the license and starting the server a separate task? It would also be nice to activate the license after the server has started (or using --host and --activate in one command)