Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleDeprecation Announcement

The functionality of the script presented in the article is migrated to JS7 - Unix Shell CLI for JOC Cockpit Status Operations

Users can continue to use the below script, no maintenance is provided.

Table of Contents

Introduction

The Check License Script introduced in this article can be used to check if a JS7 - License is valid or is about to expire.

An implementation of license checks for use with alert workflows is available from the JS7 - JITL CheckLicenseJob.

License Check Script

The License Check Script is provided for download and can be used to automate checks for license expiration.

...

Code Block
titleExample for License Check
linenumberstrue
./check-license.sh \
    --url=https://joc-2-0-primary:7446 \
    --cacert=/home/sos/jstest/certs/root-ca.pem \
    --user=root \
    --validity-days=60 \
    -p
 
# checks if a valid license is available that will not expire before the next 60 days
# establishes the connection to JOC Cockpit by HTTPS and the Root CA Certificate is specified from the path to a .pem file
# asks the user for interactive keyboard input of the password used for the account specified

Resources