As far as I know the installation is normally not be prohibited by the licence. You should check while the boot up of your code if the license is valid or not and decide if to stop the function. See Developer Guideline for more information.
There are two ways to get the information:
1) Open API: see API description your ctrlX CORE "https://<IP of your control>/doc/api/license-manager/#/Licenses/acquireLicens:
Get the license from API e.g. via REST or curl. Here the bearer token in the header is needed:
Check the response body if answer is 200 then the license is valid and reserved for you.
2) Unix Sockets:
Add a plug in your snapcraft.yaml: plugs:
...
# Bosch Rexroth licensing service.
licensing-service:
interface: content
content: licensing-service
target: $SNAP_DATA/licensing-service
apps:
# Make runtime connect accessible.
runtime:
command: connect
plugs:
- licensing-service
Get the license via POST request (see API as above) to the socket using a http library that is able to use unix sockets. unixSocket = "$SNAP_DATA/licensing-service/licensing-service.sock";
Check the response body if answer is 200 then the license is valid and reserved for you.
... View more