Versions Compared

Key

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

...

On Linux, this command must be executed from a VNC connection in order to access the GUI interface. Alternatively, the Agent Console may be installed on a Windows workstation and used to connect remotely to the agent.

Ubuntu Linux - Daemonize the Agent
Anchor
ubuntu-daemon
ubuntu-daemon

A service file for the SIF Agent needs to be created and placed in /etc/systemd/system

Code Block
languagebash
titleUSAS-SIF.service
[Unit]
Description=USAS SIF Agent
After=syslog.target network.target
 
[Service]
Type=forking
ExecStart=/data/SIFAgents/USAS-SIF-2-0-5/USAS_daemon.sh start
ExecStop=/data/SIFAgents/USAS-SIF-2-0-5/USAS_daemon.sh stop
SuccessExitStatus=143
 
[Install]
WantedBy=multi-user.target


Edit USAS_daemon.sh / USPS_daemon.sh to include the following at the top. The daemon.sh files are located in the installation directory of the Agent.

Code Block
#! /bin/sh

### BEGIN INIT INFO
# Provides:          USAS SIF 
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: USAS SIF Agent
# Description:       USAS SIF Agent
### END INIT INFO


Code Block
titleEnable the daemon
sudo systemctl enable usas_sif


Code Block
titleStart the service
systemctl start usas-sif


Code Block
titleStop the service
systemctl stop usas-sif


Code Block
titleShow Status
systemctl status usas-sif

This command leaves you in systemctl . You will need to enter Q to exit.


Anchor
Daemonize
Daemonize
REDHAT Linux - Daemonize the Agent

If this is the first installation of the Agent or the Agent is being installed using a different directory path than the previous installation, the Agent should be daemonized referrencing the installation path for the Agent.    Running the agent as a daemon is helpful, because:

...

  • Add a symbolic link to the /etc/init.d directory.   For example:

    Code Block
    languagebash
    titleRedhat
    ln -fs /SIFAgents/USAS-SIF-Agent-2.0.2/USAS_daemon.sh  /etc/init.d/usas_sif
    ln -fs /SIFAgents/USPS-SIF-Agent-2.0.2/USPS_daemon.sh  /etc/init.d/usps_sif
    


  • Ensure that the owner is root. If that is not the case, use the following command to change the owner to root.

    Code Block
    languagebash
    titleRedhat
    chown root:root /etc/init.d/usas_sif
    chown root:root /etc/init.d/usps_sif
    


  • Change the rights using the following command.

    Code Block
    languagebash
    titleRedhat
    chmod 755 /etc/init.d/usas_sif
    chmod 755 /etc/init.d/usps_sif
    


  • Next, use the following command to add the USAS_daemon.sh or USPS_daemon.sh to the list of daemons.

    Code Block
    languagebash
    titleRedhat Linux
    chkconfig --add usas_sif
    chkconfig --add usps_sif
    chkconfig --levels 2345 usas_sif on
    chkconfig --levels 2345 usps_sif on
    


  • To start the agent, use this command.

    Code Block
    languagebash
    titleRedhat
    service usas_sif start
    service usas_sif start
    


  • To ask if the agent is running, use this command.

    Code Block
    languagebash
    titleRedhat
    service usas_sif status
    service usps_sif status
    


  • To stop the agent, use this command.

    Code Block
    languagebash
    service usas_sif stop
    service usps_sif stop
    

...

A service file for the SIF Agent needs to be created and placed in /etc/systemd/system

Code Block
languagebash
titleUSAS-SIF.service
[Unit]
Description=USAS SIF Agent
After=syslog.target network.target
 
[Service]
Type=forking
ExecStart=/data/SIFAgents/USAS-SIF-2-0-5/USAS_daemon.sh start
ExecStop=/data/SIFAgents/USAS-SIF-2-0-5/USAS_daemon.sh stop
SuccessExitStatus=143
 
[Install]
WantedBy=multi-user.target

Edit USAS_daemon.sh / USPS_daemon.sh to include the following at the top. The daemon.sh files are located in the installation directory of the Agent.

Code Block
#! /bin/sh

### BEGIN INIT INFO
# Provides:          USAS SIF 
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: USAS SIF Agent
# Description:       USAS SIF Agent
### END INIT INFO

...

titleEnable the daemon

...

  • _

...

titleStart the service

...

  • sif

...

titleStop the service

...

  •  stop

...

titleShow Status

...

  • 
    

...