3 Replies Latest reply on Oct 18, 2021 7:28 AM by Aaron Sua

    Systemd for Automated Startup

    Kurt Yokum New Member

      I've researched various Infa resources and Google, but can't find a simple explanation of this combination:

      - Using systemd on Linux

      - to start/stop the IICS secure agent

      - using a Windows user account

       

      I'd be glad to see how someone else accomplished just the first two items.

       

      I've tried many variations, but here is my current iteration of the unit file and scripts:

       

      Unit iicsagent:

      -------

      [Unit]

      Description=IICS Secure Agent

      After=syslog.target network.target

       

      [Service]

      Type=simple

      User=domain\\svc_iics

      ExecStart=/opt/etl/script/agentstart.sh

      ExecStop=/opt/etl/script/agentstop.sh

      RemainAfterExit=true

       

      [Install]

      WantedBy=multi-user.target

       

       

      agentstart.sh:

      ------------------

      #!/bin/bash

      cd /opt/etl/app/infaagent/apps/agentcore

      ./infaagent shutdown

      ./infaagent startup

       

      agentstop.sh:

      ------------------

      #!/bin/bash

      cd /opt/etl/app/infaagent/apps/agentcore

      ./infaagent shutdown

       

      Right now, I'm getting a generic user error:

      ---------------------------------------------------------

      $ sudo systemctl status iicsagent

      ● iicsagent.service - IICS Secure Agent

         Loaded: loaded (/etc/systemd/system/iicsagent.service; enabled; vendor preset: disabled)

         Active: failed (Result: exit-code) since Wed 2021-02-17 16:30:05 EST; 18h ago

      Main PID: 5437 (code=exited, status=217/USER)

       

      Feb 17 16:30:05 ashpwdetl0248 systemd[1]: Started IICS Secure Agent.

      Feb 17 16:30:05 ashpwdetl0248 systemd[1]: iicsagent.service: main process exited, code=exited, status=217/USER

      Feb 17 16:30:05 ashpwdetl0248 systemd[1]: Unit iicsagent.service entered failed state.

      Feb 17 16:30:05 ashpwdetl0248 systemd[1]: iicsagent.service failed.

       

       

      I'm hoping the secret sauce is just some simple adjustment to my unit file. Could someone post their files for IICS startup/shutdown so that I can see what I'm missing?