Versions Compared

Key

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

...

Code Block
languagebash
titleExample for Controller service file
linenumberstrue
collapsetrue
[Unit]
Description=SOS JS7 Controller -id=jobscheduler
After=syslog.target
After=network.target

[Service]
# SetOptionally set JAVA_HOME environment variable if not specified with the Controller's Instance Start Script
# Environment="JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/"
# Optionally set JAVA_OPTIONS
# Environment="JAVA_OPTIONS='-Djavax.net.debug=ssl'"
Type=forking
KillMode=process
# default <JS7_CONTROLLER_PID_FILE_DIR> = <INSTALL_PATH>/var/logs
PIDFile=/var/sos-berlin.com/js7/controller>/logs/controller.pid
ExecStart=/opt/sos-berlin.com/js7/controller/bin/controller_instance.sh start
ExecStop=/opt/sos-berlin.com/js7/controller/bin/controller_instance.sh stop
ExecReload=/opt/sos-berlin.com/js7/controller/bin/controller_instance.sh restart
User=js7
StandardOutput=syslog+console
StandardError=syslog+console
TimeoutStopSec=60
TasksMax=infinity

[Install]
WantedBy=multi-user.target

...

  • Environment="JAVA_HOME=..." Optionally the JAVA_HOME environment variable can be set to specify the location of the JVM. Alternatively this environment variable can be specified with
    • the Instance Start Script ./bin/controller_instance.sh of the Controller,
    • the profile, e.g. $HOME/.bashrc, of the user account that the Controller is operated for. Consider that systemd will not run the user accounts' profile when switching to the user account.
    • If a JDK is used then specify the folder to which the JDK is installed.
    • If a JRE is used then specify the folder to which the JRE is installed.
  • Environment="JAVA_OPTIONS=..." Optionally set Java options, e.g. to specify the heap size or debugging options, if not provided by the Controller's ./bin/controller_instance.sh Instance Start Script.
  • PIDFile=... The controller.pid PID file includes the process ID that is assigned when starting the Controller. if not otherwise specified by the Instance Start Script then the file is located in the logs directory.
  • ExecStart, ExecStop, ExecReload The operation to start, to stop and to restart the Controller is performed by running the Controller's Instance Start Script.
  • User=js7 The example assumes that the Controller is operated for the js7 user account. If the JS7_USER environment variable is set from the Controller's Instance Start Script then the values have to match.

...

Code Block
languagebash
titleExample for Agent service file
linenumberstrue
collapsetrue
[Unit]
Description=SOS JS7 Agent -port=4445
After=syslog.target
After=network.target

[Service]
# Optionally Setset JAVA_HOME environment variable if not specified with the Agent's Instance Start Script
# Environment="JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/"
# Optionally set JAVA_OPTIONS
# Environment="JAVA_OPTIONS='-Djavax.net.debug=ssl'"
Type=forking
KillMode=process
# default <JS7_AGENT_PID_FILE_DIR> = <INSTALL_PATH>/var_<JS7_AGENT_HTTP_PORT>/logs
PIDFile=/var/sos-berlin.com/js7/agent/logs/agent.pid
ExecStart=/opt/sos-berlin.com/js7/agent/bin/agent_4445.sh start
ExecStop=/opt/sos-berlin.com/js7/agent/bin/agent_4445.sh stop
ExecReload=/opt/sos-berlin.com/js7/agent/bin/agent_4445.sh restart
User=js7
StandardOutput=syslog+console
StandardError=syslog+console
TimeoutStopSec=60
TasksMax=infinity

[Install]
WantedBy=multi-user.target

...

  • Environment="JAVA_HOME=..." Optionally the JAVA_HOME environment variable can be set to specify the location of the JVM. Alternatively this environment variable can be specified e.g. with
    • the Instance Start Script ./bin/agent_<port>.sh of the Agent,
    • the profile, e.g. $HOME/.bashrc, of the user account that the Agent is operated for. Consider that systemd will not run the user accounts' profile when switching to the user account.
    • If a JDK is used then specify the folder to which the JDK is installed.
    • If a JRE is used then specify the folder to which the JRE is installed.
  • Environment="JAVA_OPTIONS=..." Optionally set Java options, e.g. to specify the heap size or debugging options, if not provided by the Agent's ./bin/agent_<port>.sh Instance Start Script.
  • PIDFile=... The agent.pid PID file includes the process ID that is assigned when starting the Agent. if not otherwise specified by the Instance Start Script then the file is located in the logs directory.
  • ExecStart, ExecStop, ExecReload The operation to start, to stop and to restart the Agent is performed by running the Agent's Instance Start Script.
  • User=js7 The example assumes that the Agent is operated for the js7 user account. If the JS7_USER environment variable is set from the Agent's Instance Start Script then the values have to match.

...

Code Block
languagebash
titleExample for JOC Cockpit service file
linenumberstrue
collapsetrue
[Unit]
Description=Jetty for SOS JS7 JOC Cockpit
After=syslog.target
After=network.target

[Service]
# Optionally Setset JAVA_HOME environment variable if necessary
# Environment="JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk"
# Optionally set JAVA_OPTIONS
# Environment="JAVA_OPTIONS='-Djavax.net.debug=ssl'"
Type=forking
PIDFile=/var/sos-berlin.com/js7/joc/joc.pid
ExecStart=/opt/sos-berlin.com/js7/joc/jetty/bin/jetty.sh start
ExecStop=/opt/sos-berlin.com/js7/joc/jetty/bin/jetty.sh stop
ExecReload=/opt/sos-berlin.com/js7/joc/jetty/bin/jetty.sh restart
User=js7
StandardOutput=syslog+console
StandardError=syslog+console
SuccessExitStatus=143
TimeoutStopSec=60

[Install]
WantedBy=multi-user.target

...

  • Environment="JAVA_HOME=..." Optionally the JAVA_HOME environment variable can be set to specify the location of the JVM. Alternatively this environment variable can be specified e.g. with
    • the Instance Start Script ./bin/agent_<port>.sh of the Agent,
    • the profile, e.g. $HOME/.bashrc, of the user account that the Agent is operated for. Consider that systemd will not run the user accounts' profile when switching to the user account.
    • If a JDK is used then specify the folder to which the JDK is installed.
    • If a JRE is used then specify the folder to which the JRE is installed.
  • Environment="JAVA_OPTIONS=..." Optionally set Java options, e.g. to specify the heap size or debugging options, if not not provided by some other location as e.g. /etc/default/joc.
  • PIDFile=... The joc.pid PID file includes the process ID that is assigned when starting JOC Cockpit. By default the file is located in the JETTY_BASE directory.
  • ExecStart, ExecStop, ExecReload The operation to start, to stop and to restart the Agent is performed by running the JOC Cockpit Start Script.
  • User=js7 The example assumes that the Agent is operated for the js7 user account. If the JS7_USER environment variable is set from the Agent's Instance Start Script then the values have to match.

...

  • Consider that the name controller corresponds to a service file name controller.service.
  • The above examples accordingly similarly apply to the Agent and JOC Cockpit.

...