Versions Compared

Key

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

...

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 Agentrelease releasetarball from the SOS Web Site
# creates the home directory if it does not exist
# extracts the tarball to the Agent's home directory

...

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 release 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

...

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 \
    --exec-start="StartService" \
    --exec-stop="StopService" \
    --make-dirs

# downloads the release tarball from the SOS Web Site using curl
# extracts the tarball to the Agent's home directory
# starts and stops the Agent by use of systemd commands

...

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 \
    --exec-start="/home/sos/agent/bin/agent_4445.sh start" \
    --exec-stop="/home/sos/agent/bin/agent_4445.sh stop" \
    --make-dirs

# downloads the release tarball from the SOS Web Site using curl
# extracts the tarball to the Agent's home directory
# starts and stops the Agent by individual commands

...

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 \
    --restart \
    --make-dirs

# downloads the release tarball from the SOS Web Site using curl
# extracts the tarball to the Agent's home directory
# starts and stops the Agent from its 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
retval=/tmp/js7_install_agent.$$.tmp

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/tmp/js7_agent_unix.2.5.2.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)

# downloads the release tarball from the SOS Web Site using curl
# creates a backup archive and log file
# extracts the tarball to the Agent's home directory
# provides return values from a temporary file which includes the path to the log file and to the backup archive

...

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
retval=/tmp/js7_install_agent.$$.tmp

./js7_install_agent.sh \
    --home=/home/sos/agent \
    --tarball=/tmp/js7_agent_unix.2.5.2.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)

# downloads the release tarball from the SOS Web Site using curl
# creates a backup archive and log file
# extracts the tarball to the Agent's home directory
# reverts the installation from a backup archive in case of failure
# stops and starts the Agent from its instance start script
# displays log output on termination of the script

...

Code Block
titleExample 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=/tmp/js7_agent_unix.2.2.3.JS-1984.tar.gz \
    --patch=JS-1984 \
    --exec-start=StartService \
    --exec-stop=StopService

# downloads the patch tarball from the SOS Web Site using curl
# extracts the patch tarball to the Agent's home directory
# stores patch files to the Agent's <home>/lib/patches sub-directory
# stops and starts the Agent's systemd service

...