Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleUsage
Usage: operate-joc.sh [Command] [Options] [Switches]

  Commands:
    status             --controller-id
    check-license     [--validity-days]
    encrypt           --in [--infile --outfile] --cert [--java-home] [--java-lib]
    decrypt           --in [--infile --outfile] --key [--key-password] [--java-home] [--java-lib] 

  Options:
    --url=<url>                        | required: JOC Cockpit URL
    --user=<account>                   | required: JOC Cockpit user account
    --password=<password>              | optional: JOC Cockpit password
    --ca-cert=<path>                   | optional: path to CA Certificate used for JOC Cockpit login
    --client-cert=<path>               | optional: path to Client Certificate used for login
    --client-key=<path>                | optional: path to Client Key used for login
    --timeout=<seconds>                | optional: timeout for request, default: 60
    --controller-id=<id>               | required: Controller ID
    --validity-days=<number>           | optional: min. number of days for which a license should be valid, default: 60 
    --key=<path>                       | optional: path to private key file in PEM format
    --key-password=<password>          | optional: password for private key file
    --cert=<path>                      | optional: path to certificate file in PEM format
    --in=<string>                      | optional: input string for encryption/decryption
    --infile=<path>                    | optional: input file for encryption/decryption
    --outfile=<path>                   | optional: output file for encryption/decryption
    --java-home=<directory>            | optional: Java Home directory for encryption/decryption, default: $JAVA_HOME
    --java-lib=<directory>             | optional: Java library directory for encryption/decryption, default: ./lib
    --audit-message=<string>           | optional: audit log message
    --audit-time-spent=<number>        | optional: audit log time spent in minutes
    --audit-link=<url>                 | optional: audit log link
    --log-dir=<directory>              | optional: path to directory holding the script's log files

  Switches:
    -h | --help                        | displays usage
    -v | --verbose                     | displays verbose output, repeat to increase verbosity
    -p | --password                    | asks for password
    -k | --key-password                | asks for key password
    --show-logs                        | shows log output if --log-dir is used
    --make-dirs                        | creates directories if they do not exist

see https://kb.sos-berlin.com/x/QoiOCQ

Commands

  • status
    • Returns status information about JOC Cockpit, Controller instances and database indicated by a textual status and severity, for details see JS7 - Dashboard:

      JOC Cockpit StatusPropertyValue
      JOC Cockpit Cluster Statuscurrenttrue | false



      Controller StatusTextSeverity
      Controller Cluster Statuscoupled0

      unknown3
      Controller Cluster Node Statusactive0

      inactive1

      unknown3
       Controller Component Statusoperational0

      limited1

      inoperable2

      unknown3
      Controller Connection Statusestablished0

      unstable1

      unreachable2

      unknown3



      Database StatusTextSeverity
      Database Component Statusoperational0

      unknown3
      Database Connection Statusestablished0

      unstable1

      unreachable2

      unknown3



  • check-license
    • Checks which JS7 - License is available with JOC Cockpit and if it is valid for a predetermined period.
      • The Open Source License is valid for any period of time and will not expire.
      • The Commercial License can be perpetual or can be valid for a limited subscription period.
    • The --validity-days option specifies the number of days before expiration of the Commercial License. Default: 60 days.
    • Exit codes of the license check include: 
      • Exit code 0 signals a valid license for the period specified.
      • Exit code 2 signals an expired license or an inapplicable license check if the Open Source License is used.
      • Exit code 3 signals a valid license that is about to expire within the number of days specified.
  • encrypt
    • Allows to encrypt a value using the --in option. If used to encrypt a file then --infile and --outfile options must be specified.
    • The --cert option specifies the path to a file holding the Certificate used for encryption.
    • Encryption is performed by Java libraries that are looked up in the ./lib sub-directory of the  JS7 Unix Shell CLI. For details see JS7 - Encryption and Decryption.
  • decrypt
    • Allows to decrypt a value using the --in option. If used to decrypt a file then --infile and --outfile options must be specified.
    • The --key option specifies the path to the Private Key used for decryption. If the Private Key is protected by a password, then the --key-password option or switch must be specified.
    • Decryption is performed by Java libraries that are looked up in the ./lib sub-directory of the JS7 Unix Shell CLI.

...