Versions Compared

Key

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

...

  • --home
    • Specifies the directory in which the Agent should be installed.
  • --data
    • Specifies the directory in which Agent data such as configuration files should be stored.
    • By default the <home>/var_<http-port> directory is used, see options --home and --http-port.
  • --config
    • Specifies the directory from which the Agent reads configuration files.
    • By default the <data>/config directory is used, see option --data.
  • --logs
    • Specifies the directory to which the Agent stores log files.
    • By default the <data>/logs directory is used, see option --data.
  • --work
    • Specifies the working directory of the Agent.
    • By default the <data> directory is used, see option --data.
  • --user
    • Specifies the user account for the Agent daemon.
    • By default the account of the user running the Agent Installation Script is used.
  • --release
    • Specifies a release number such as 2.3.1 for download from the SOS web site if the --tarball option is not used.
  • --tarball
    • Optionally specifies the path to a .tar.gz file that holds the Agent installation files. If this option is not used the installation tarball will be downloaded from the SOS web site for the release indicated with the --release option.
    • Download is performed with curl that considers http_proxy and https_proxy environment variables and respective settings from a .curlrc file.
  • --patch
    • A patch is identified by an issue key in the Change Management System, for example JS-1984.
    • Patches are downloaded from the SOS web site if the --tarball option is not used.
    • Patches are added to the Agent's <home>/lib/patches directory. Note that the patches sub-directory will be emptied when updating an Agent installation later on.
    • If a backup directory is specified then an Agent's existing installation directory will be added to a .tar.gz backup file in this directory.
  • --instancehttp-scriptport
    • Specifies the path to an Instance Start Script that acts as a template and that is copied to the bin directory. Typically the name agent_<http-port>.sh. is used. Users are free to choose any name for the Instance Start Script. The script has to be executable for the Agent daemon, see --user option. Permissions of the script are not changed by the Agent Installation Script.
    • The Agent Installation Script will perform replacements in the Instance Start Script template for known placeholders such as <JS7_AGENT_USER>, for details see ./bin/agent_instance.sh-example.
  • --backup-dir
    • If a backup directory is specified then an Agent's existing installation directory will be added to a .tar.gz file in this directory.
    • File names are created according to the pattern: backup_js7_agent.<hostname>.<release>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz
    • For example: backup_js7_agent.centostest_primary.2.3.1.2022-03-19T20-50-45.tar.gz
  • --log-dir
    • If a log directory is specified then the Agent Installation Script will log information about processing steps in a log file in this directory.
    • File names are created according to the pattern: install_js7_agent.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
    • For example: install_js7_agent.centostest_primary.2022-03-19T20-50-45.log
  • --exec-start
    • This option can be used should the Agent be started after installation. For example, when using systemd then the option --exec-start="StartService" will start the Agent service provided that the related systemd service has been created manually or by use of the --make-service switch. Alternatively users can specify individual commands, for example --exec-start="sudo systemctl start js7_agent_4445".
    • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
    • This option is an alternative to the use of the --restart switch which will start the Agent from its Instance Start Script. If specified this option overrules the --restart switch.
    • HTTP port that the Agent is operated for. The default value is 4445. The Agent by default makes use of a configuration directory ./var_<http-port> that will be excluded from a backup taken with the --backup-dir option. In addition the HTTP port is used to identify the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script and to specify the value of the JS7_AGENT_HTTP_PORT environment variable in the script.
    • The port can be prefixed by the network interface, for example localhost:4445.
    • When used with the --restart switch the HTTP port is used to identify if the Agent is running.
  • --https-port
    • Specifies the HTTPS port that the Agent is operated for. The HTTPS port is specified in the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script with the environment variable JS7_AGENT_HTTPS_PORT. Use of HTTPS requires a keystore and truststore to be present, see --keystore and --truststore options.
    • The port can be prefixed by the network interface, for example batch.example.com:4445.
  • --pid-file-dir
    • Specifies the directory to which the Agent stores its PID file. By default the <data>/logs directory is used.
    • When using SELinux then it is recommended to specify the /var/run directory, see JS7 - How to install for SELinux.
  • --pid-file-name
    • Specifies the name of the PID file. By default the file name agent.pid is used.
    • The PID file is created in the directory specified by the --pid-file-dir option.
  • --instance-script
    • Specifies the path to an Instance Start Script that acts as a template and that is copied to the bin directory. Typically the name agent_<http-port>.sh. is used. Users are free to choose any name for the Instance Start Script. The script has to be executable for the Agent daemon, see --user option. Permissions of the script are not changed by the Agent Installation Script.
    • The Agent Installation Script will perform replacements in the Instance Start Script template for known placeholders such as <JS7_AGENT_USER>, for details see ./bin/agent_instance.sh-example.
  • --backup-dir
    • If a backup directory is specified then an Agent's existing installation directory will be added to a .tar.gz file in this directory.
    • File names are created according to the pattern: backup_js7_agent.<hostname>.<release>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.tar.gz
    • For example: backup_js7_agent.centostest_primary.2.3.1.2022-03-19T20-50-45.tar.gz
  • --log-dir
    • If a log directory is specified then the Agent Installation Script will log information about processing steps in a log file in this directory.
    • File names are created according to the pattern: install_js7_agent.<hostname>.<yyyy>-<MM>-<dd>T<hh>-<mm>-<ss>.log
    • For example: install_js7_agent.centostest_primary.2022-03-19T20-50-45.log
  • --exec-start
    • This option can be used should the Agent be started after installation. For example, when using systemd then the option --exec-start="StartService" will start the Agent service provided that the related systemd service has been created manually or by use of the --make-service switch. Alternatively users can specify individual commands, for example --exec-start="sudo systemctl start js7_agent_4445".
    • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
    • This option is an alternative to the use of the --restart switch which will start
    --exec-stop
    • This option can be used should the Agent be stopped before installation. For example, when using systemd then the option --exec-stop="StopService" will stop the Agent service provided that the related systemd service has been created manually or by use of the --make-service switch. Alternatively users can specify individual commands, for example --exec-stop="sudo systemctl stop js7_agent_4445".
    • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
    • This option is an alternative to the use of the --restart switch which stops the Agent from its Instance Start Script. If specified this option overrules the --restart switch.
  • --returnexec-valuesstop
    • This option can be used should the Agent be stopped before installation. For example, when using systemd then the option --exec-stop="StopService" will stop the Agent service provided that the related systemd service has been created manually or by use of the --make-service switch. Alternatively users can specify individual commands, for example --exec-stop="sudo systemctl stop js7_agent_4445".
    • For systemd service files see the JS7 - systemd Service Files for automated Startup and Shutdown with Unix Systems article.
    • This option is an alternative to the use of the --restart switch which stops the Agent from its Instance Start Script. If specified this option overrules the --restart switch.
  • --return-values
    • Optionally specifies the path to a file to which return values will be added in the format <name>=<key>. For example:
      • log_file=install_js7_agent.centostest_primary.2022-
    • Optionally specifies the path to a file to which return values will be added in the format <name>=<key>. For example:
      • log_file=install_js7_agent.centostest_primary.2022-03-20T04-54-31.log
      • backup_file=backup_js7_agent.centostest_primary.2.3.1.2022-03-20T04-54-31.tar.gz
    • An existing file will be overwritten. It is recommended to use a unique file name such as /tmp/return.$$.$RANDOM.properties.
    • A value from the file can be retrieved like this:
      • backup=$(cat /tmp/return.$$.$RANDOM.properties | grep "backup_file" | cut -d'=' -f2)

...

  • --deploy-dir
    • Specifies the path to a deployment directory that holds configuration files and sub-directories that will be copied to the <config> folder. A deployment directory allows to manage central copies of configuration files such as agent.conf, private.conf, log4j2.xml etc.
    • Use of a deployment directory has lower precedence as files can be overwritten by individual options such as --agent-conf, --private-conf etc.
  • --agent-conf
    • Specifies the path to a configuration file for global JS7 - Agent Configuration Items. The file will be copied to the <config>/agent.conf file.
    • Any path to a file can be used as a value of this option, however, the target file name agent.conf will be used.
  • --private-conf
    • Specifies the path to a configuration file for private JS7 - Agent Configuration Items. The file will be copied to the <config>/private/private.conf file.
    • Any path to a file can be used as a value of this option, however, the target file name private.conf will be used.
  • --controller-id
    • Specifies the Controller ID, a unique identifier of the Controller installation. Agents will be dedicated to the Controller with the given Controller ID.
    • The Controller ID is used in the Agent's private.conf file to specify which Controller can access a given Agent.
  • --controller-primary-cert
    • Specifies the path to the SSL/TLS certificate of the Primary Controller Instance. The Agent Installation Script extracts the distinguished name from the given certificate and adds it to the Agent's private.conf file to allow HTTPS connections from the given Controller using mutual authentication without the need for passwords.
  • --controller-secondary-cert
    • Corresponds to the --controller-primary-cert option and is used for the Secondary Controller Instance.
  • --http-portkeystore
    • Specifies the HTTP port that the Agent is operated for. The default value is 4445. The Agent by default makes use of a configuration directory ./var_<http-port> that will be excluded from a backup taken with the --backup-dir option. In addition the HTTP port is used to identify the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script and to specify the value of the JS7_AGENT_HTTP_PORT environment variable in the script.
    • The port can be prefixed by the network interface, for example localhost:4445.
    • When used with the --restart switch the HTTP port is used to identify if the Agent is running.
  • --https-port
    • Specifies the HTTPS port that the Agent is operated for. The HTTPS port is specified in the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script with the environment variable JS7_AGENT_HTTPS_PORT. Use of HTTPS requires a keystore and truststore to be present, see --keystore and --truststore options.
    • The port can be prefixed by the network interface, for example batch.example.com:4445.
  • --pid-file-dir
    • Specifies the directory to which the Agent stores its PID file. By default the <data>/logs directory is used.
    • When using SELinux then it is recommended to specify the /var/run directory, see JS7 - How to install for SELinux.
  • --pid-file-name
    • Specifies the name of the PID file. By default the file name agent.pid is used.
    • The PID file is created in the directory specified by the --pid-file-dir option.
    • path to a PKCS12 keystore file that holds the private key and certificate for HTTPS connections to the Agent.
    • Users are free to specify any file name, typically the name https-keystore.p12 is used. The keystore file will be copied to the <config>/private directory.
    • If a keystore file is made available then the Agent's <config>/private/private.conf file has to hold a reference to the keystore location and optionally the keystore password. It is therefore recommended to use the --private-conf option to deploy an individual private.conf file that holds settings related to a keystore.
    • For automating the creation of keystores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --keystore-password
    • Specifies the password for access to the keystore. Use of a keystore password is required.
  • --keystore-alias
    • If a keystore holds more than one private key, for example if separate pairs of private keys/certificates for server authentication and client authentication exist, then it is not determined which private key/certificate will be used. The alias name of a given private key/certificate is specified when the entry is added to the keystore. The alias name allows to indicate a specific private key/certificate to be used.
  • --truststore
    • Specifies the path to a PKCS12 truststore file that holds the certificate(s) for HTTPS connections to the Agent using mutual authentication
    --keystore
    • Specifies the path to a PKCS12 keystore file that holds the private key and certificate for HTTPS connections to the Agent .
    • Users are free to specify any file name, typically the name https-keystoretruststore.p12 is used. The keystore truststore file will be copied to the <config>/private directory.
    • If a keystore truststore file is made available then the Agent's <config>/private/private.conf file has to hold a reference to the keystore truststore location and optionally the keystore truststore password. It  It is therefore recommended to use the --private-conf option to deploy an individual private.conf file that holds settings related to a keystoretruststore.
    • For automating the creation of keystores see truststores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --keystoretruststore-password
    • Specifies the password for access to the keystoretruststore. Use of a keystore password is requiredpassword is recommended as it is not primarily intended to protect access to the truststore. The password is intended to allow verification that truststore entries have been added using the same password.
  • --keystorejava-alias
    • If a keystore holds more than one private key, for example if separate pairs of private keys/certificates for server authentication and client authentication exist, then it is not determined which private key/certificate will be used. The alias name of a given private key/certificate is specified when the entry is added to the keystore. The alias name allows to indicate a specific private key/certificate to be used.
  • --truststore
    • Specifies the path to a PKCS12 truststore file that holds the certificate(s) for HTTPS connections to the Agent using mutual authentication .
    • Users are free to specify any file name, typically the name https-truststore.p12 is used. The truststore file will be copied to the <config>/private directory.
    • If a truststore file is made available then the Agent's <config>/private/private.conf file has to hold a reference to the truststore location and optionally the truststore password. It is therefore recommended to use the --private-conf option to deploy an individual private.conf file that holds settings related to a truststore.
    • For automating the creation of truststores see JS7 - How to add SSL TLS Certificates to Keystore and Truststore.
  • --truststore-password
    • Specifies the password for access to the truststore. Use of a password is recommended as it is not primarily intended to protect access to the truststore. The password is intended to allow verification that truststore entries have been added using the same password.
  • --java-home
    • Specifies the Java home directory that will be made available to the Agent from the JAVA_HOME environment variable specified with the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script.
  • --java-options
    • Specifies the Java options that will be made available to the Agent from the JAVA_OPTIONS environment variable specified with the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script.
    • Java options can be used for example to specify Java heap space settings for the Agent.
    • If more than one Java option is used then the value has to be quoted, for example --java-options="-Xms256m -Xmx512m".
  • home
    • Specifies the Java home directory that will be made available to the Agent from the JAVA_HOME environment variable specified with the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script.
  • --java-options
    • Specifies the Java options that will be made available to the Agent from the JAVA_OPTIONS environment variable specified with the Agent Instance Start Script typically available from the ./bin/agent_<http-port>.sh script.
    • Java options can be used for example to specify Java heap space settings for the Agent.
    • If more than one Java option is used then the value has to be quoted, for example --java-options="-Xms256m -Xmx512m".
  • --service-dir
    • Specifies the systemd service directory to which the Agent's service file will be copied if the --make-service switch is used.
    • By default the a/usr/lib/systemd/system will be used. Users can specify an alternative location.
  • --service-file
    • Specifies the path to a systemd service file that acts as a template and that will be copied to the Agent's <home>/bin directory. Users are free to choose any file name as a template for the service file. The resulting service file name will be agent_<http-port>.service.
    • The Agent Installation Script will perform replacements in the service file to update paths and the port to be used, for details see ./bin/agent.service-example.
  • --service-name
    • Specifies the name of the systemd service that will be created
    --service-dir
    • Specifies the systemd service directory to which the Agent's service file will be copied if the --make-service switch is used.
    • By default the a/usr/lib/systemd/system service name js7_agent_<http-port> will be used. Users can specify an alternative location

Switches

  • -h | --help
    • Displays usage.
  • --serviceno-fileinstall
    • Specifies the path to a systemd service file that acts as a template and that will be copied to the Agent's <home>/bin directory. Users are free to choose any file name as a template for the service file. The resulting service file name will be agent_<http-port>.service.
    • The Agent Installation Script will perform replacements in the service file to update paths and the port to be used, for details see ./bin/agent.service-example.
  • --service-name
    • Specifies the name of the systemd service that will be created if the --make-service switch is used.
    • By default the service name js7_agent_<http-port> will be used.

Switches

    • if the Installation Script should be used to update configuration items without changes to the binary files of the installation.
      In fact no installation is performed but configuration changes as for example specified with the --keystore argument will be applied.
  • --uninstall
    • Uninstalls the Agent including the steps to stop & remove a running Agent service and to remove the <home> and <data> directories.
  • --show-logs
    • Displays the log output created by the script if the --log-dir option is used.
  • --make-dirs
    • If directories are missing that are indicated with the --home, --backup-dir or --log-dir options then they will be created.
  • --make-service
    • Specifies that a systemd service should be created for the Agent. The service will be created from the --service-name option or its default value.
  • --move-libs
    • For an existing Agent installation the lib sub-directory includes .jar files that carry the release
  • -h | --help
    • Displays usage.
  • --no-install
    • Specifies if the Installation Script should be used to update configuration items without changes to the binary files of the installation.
      In fact no installation is performed but configuration changes as for example specified with the --keystore argument will be applied.
  • --uninstall
    • Uninstalls the Agent including the steps to stop & remove a running Agent service and to remove the <home> and <data> directories.
  • --show-logs
    • Displays the log output created by the script if the --log-dir option is used.
  • --make-dirs
    • If directories are missing that are indicated with the --home, --backup-dir or --log-dir options then they will be created.
  • --make-service
    • Specifies that a systemd service should be created for the Agent. The service will be created from the --service-name option or its default value.
  • --move-libs
    • For an existing Agent installation the lib sub-directory includes .jar files that carry the release number in their file names. If replaced by a newer version the lib directory has to be moved or removed. This switch tries to move the directory to a previous version number as indicated from the .version file in the Agent's home directory, for example to rename lib to lib.2.3.1.
    • Files in the lib/user_lib sub-directory are preserved.
  • --remove-journal
    • If Agents have been installed for the wrong operating mode (standalone, clustered) then the Agent's journal in the JS7_AGENT_DATA/state directory can be removed. This operation removes any orders submitted to an Agent and requires the Agent to be re-registered to a Controller.
  • --restart
    • Stops a running Agent before installation and starts the Agent after installation using the Agent's Instance Start Script. This switch can be used with the --abort and --kill switches to control the way how the Agent is terminated. This switch is ignored if the --exec-start or --exec-stop options are used.
  • --abort
    • Aborts a running Agent and kills any running tasks including child processes if used with the --restart switch. Aborting an Agent includes to terminate the Agent in an orderly manner that allows to close files consistently.
  • --kill
    • Kills a running Agent and any running tasks if used with the --restart switch. This includes killing child processes of running tasks.

...

The Agent Installation Script performs replacements of placeholders in installation files and configuration files by option values, for details see chapter Replacements.

Examples

The following examples illustrate typical use cases. Users should consider to specify current releases, see JS7 - Download.

...

The following examples illustrate typical use cases. Users should consider to specify current releases, see JS7 - Download.

Install or Update from Download

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
./js7_install_agent.sh \
    --home=/home/sos/agent \
    --release=2.5.2 \
    --make-dirs

# downloads the Agent release from the SOS Web Site
# creates the home directory if it does not exist
# extracts the tarball to the Agent's home directory

Install or Update from Tarball

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' -o /tmp/js7_agent_unix.2.5.2.tar.gz

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/tmp/js7_agent_unix.2.5.2.tar.gz \
    --make-dirs

# downloads the tarball from the SOS Web Site using curl
# creates the home directory if it does not exist
# extracts the tarball to the Agent's home directory

Install or Update and Stop/Start using systemd

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' -o /tmp/js7_agent_unix.2.5.2.tar.gz

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --release=2.3.1tarball=/tmp/js7_agent_unix.2.5.2.tar.gz \
    --exec-start="StartService" \
    --exec-stop="StopService" \
    --make-dirs

# downloads the indicated Agent release and tarball from the SOS Web Site using curl
# extracts the tarball to the specified Agent's home directory
# thestarts homeand directorystops isthe createdAgent ifby ituse doesof notsystemd existcommands

Install or Update

...

and Stop/Start using individual commands

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnt/releases/js7curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.35.12.tar.gz

# extracts the indicated tarball to the specified Agent home directory

Install or Update and Stop/Start using systemd

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
' -o /tmp/js7_agent_unix.2.5.2.tar.gz

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnt/releases/js7tmp/js7_agent_unix.2.35.12.tar.gz \
    --exec-start="sudo systemctl start js7_agent/home/sos/agent/bin/agent_4445.sh start" \
    --exec-stop="sudo systemctl stop js7_agent"

# "/home/sos/agent/bin/agent_4445.sh stop" \
    --make-dirs

# downloads the tarball from the SOS Web Site using curl
# extracts the indicated tarball to the specified AgentAgent's home directory
# thestarts Agentand isstops startedthe andAgent stopped by use ofindividual systemd commands

Install or Update and

...

Stop/Start using the Instance Start Script

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' -o /tmp/js7_agent_unix.2.5.2.tar.gz

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnt/releasestmp/js7/js7_agent_unix.2.35.2.1.tar.gztar.gz \
    --restart \
    --make-restartdirs

# downloads the tarball from the SOS Web Site using curl
# extracts the indicated tarball to the specified Agent's home directory
# thestarts Agentand isstops stoppedthe andAgent started from its instance start script

Install or Update with Return Valuesor Update with Return Values

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' -o /tmp/js7_agent_unix.2.5.2.tar.gz
Code Block
titleExample for use of Agent Installer Script
linenumberstrue
retval=/tmp/js7_install_agent.$$.tmp

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnttmp/releases/js7/js7_agent_unix.2.35.12.tar.gz \
    --backup-dir=/tmp/backups \
    --log-dir=/tmp/logs \
    --return-values=$retval \
    --make-dirs

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)
" | cut -d'=' -f2)

# downloads the tarball from the SOS Web Site using curl
# creates a backup archive and log file
# extracts the indicated tarball to the specified Agent's home directory,
# createsprovides areturn logvalues file andfrom a backuptemporary file
# returnwhich values includeincludes the path to the log file and to the backup file

Install or Update with Fallback

 the backup archive

Install or Update with Fallback

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.5/js7_agent_unix.2.5.2.tar.gz' -o /tmp/js7_agent_unix.2.5.2.tar.gz
Code Block
titleExample for use of Agent Installer Script
linenumberstrue
retval=/tmp/js7_install_agent.$$.tmp

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnt/releases/js7tmp/js7_agent_unix.2.35.12.tar.gz \
    --backup-dir=/tmp/backups \
    --log-dir=/tmp/logs \
    --return-values=$retval \
    --restart \
    --show-logs \
    --make-dirs \
 || ( backup=$(cat $retval | grep "backup_file" | cut -d'=' -f2 ) \
      && ( test -e "$backup" ) && \
      ./js7_install_agent.sh \
          --home=/home/sos/agent \
          --tarball=$backup \
          --log-dir=/tmp/logs \
          --restart \
          --show-logs )

log_file=$(cat $retval | grep "log_file" | cut -d'=' -f2)
backup_file=$(cat $retval | grep "backup_file" | cut -d'=' -f2)
 | grep "backup_file" | cut -d'=' -f2)

# downloads the tarball from the SOS Web Site using curl
# creates a backup archive and log file
# extracts the indicated tarball to the specified Agent's home directory, creates
# reverts the installation from a backup filearchive in andcase aof logfailure
# filestops and restartsstarts the Agent from its instance start script
# shoulddisplays installationlog failoutput thenon ittermination is revertedof from the backup file

...

script

Renew Certificates

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
./js7_install_agent.sh \
    --home=/home/sos/agentagent.sh \
    --tarballhome=/mnthome/releases/js7sos/js7_agent_unix.2.3.1.tar.gz \
    --http-port=localhost:4445 \
    --https-port=batch.example.com:4445 \
    --java-options="-Xms64m -Xmx256m" \
    --agent-private-conf=/home/sos/agent-deployment/agentprivate.conf \
    --private-confkeystore=/home/sos/agent-deployment/privatehttps-keystore.confp12 \
    --keystore-password="jobscheduler" \
    --truststore=/home/sos/agent-deployment/https-keystoretruststore.p12 \
    --truststore=/home/sos/agent-deployment/https-truststore.p12-password="jobscheduler" \
    --exec-start=StartService \
    --exec-stop=StopService \
     --makeno-dirsinstall

# extractsaddresses the indicated tarball to the specified Agent home directory
# runs the Agent an existing Agent operated for HTTP port 4445 on the localhost network interface and the same HTTPS port on the server network interface
# deploys globalthe andAgent private Agent configuration filesfile that holdholds references to keystore and truststore
# deploys keystore and truststore files
# stops and starts the Agent's systemd service

Patch from Download

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
./js7_install_agent.sh \
    --home=/home/sos/agent \
    --release=2.2.3.1 \
    --patch=JS-1984 \
    --exec-start=StartService \
    --exec-stop=StopService
 
# downloads the patch tarball from the indicatedSOS AgentWeb patchSite and
# extracts the patch tarball to the specified Agent's home directory
# stores the patch is storedfiles to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

Patch from Tarball

Code Block
titleExample for use of Agent Installer Script
linenumberstrue
Example for use of Agent Installer Script
linenumberstrue
curl 'https://download.sos-berlin.com/JobScheduler.2.2/js7_agent_unix.2.2.3.JS-1984.tar.gz' -o /tmp/js7_agent_unix.2.2.3.JS-1984.tar.gz

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/mnttmp/releases/js7/js7_agent_unix.2.2.3.1.JS-1984.tar.gz \
    --patch=JS-1984 \
    --exec-start=StartService \
    --exec-stop=StopService

# downloads the patch tarball using curl
# extracts the indicated patch tarball to the specified Agent's home directory
# thestores patch is storedfiles to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

Anchor
replacements
replacements
Replacements

...