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 the 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
      JOC Cockpit Controller Cluster Statuscoupled0

      unknown13
      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
    • Terminates an order which optionally includes to forcibly terminate running jobs using the --force switch.
    • When used for license checks the script terminates with exit code 0 to signal a valid license that will not expire before a number of days. Exit code 2 signals an expired license, exit code 3 signals a valid license that is about to expire within a number of days.
  • 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.

...