Hello baal,
Currently, the only way to deactivate a license with the FLS running in the background is to communicate with the FLS via HTTP requests, as you normally do in the web browser but now in the command-line, e.g. with curl:
curl -c fls_cookies.txt -d "user_name=<username>&user_password=<password>" <host>:<port>/login.html
curl -b fls_cookies.txt -d "action=Deactivate&product=metashape-pro&confirmation=Yes" <host>:<port>/deactivate.html
Here cookies are stored in fls_cookies.txt, but they can also be stored in a variable:
cookies=$(curl -c - -d "user_name=<username>&user_password=<password>" <host>:<port>/login.html)
echo "${cookies}" | curl -b - -d "action=Deactivate&product=metashape-pro&confirmation=Yes" <host>:<port>/deactivate.html
Or, if your curl supports "--next" option, you can try a single command with no cookies file:
curl -b "" -d "user_name=<username>&user_password=<password>" <host>:<port>/login.html --next -b "" -d "action=Deactivate&product=metashape-pro&confirmation=Yes" <host>:<port>/deactivate.html
Please note:
1. FLS requires login, so two requests are needed and use cookies. <username> and <password> should be url-encoded, i.e. a whitespace is replaced with '+' and so on.
2. <host>:<port> should be one of the FLS addresses displayed on its "Help" page, not "0.0.0.0".
3. Request parameters may change in future versions, so these commands may require adjustment after FLS updates.
The activation and starting the server are separated, because the license is activated once (or very rarely), whereas the server can be re-started many times.