Creating new service definition in systemctl
search cancel

Creating new service definition in systemctl

book

Article ID: 379741

calendar_today

Updated On: 10-15-2024

Products

VMware Smart Assurance

Issue/Introduction

Enabling start on bootup and stop on shutdown 

Environment

Watch4Net 7.x

Cause

Default Watch4Net installation does not add the service to sytemctl

Resolution

  • Create the new Watch4Net service file
    vi /etc/systemd/system/watch4net.service
  • Add the following and update the path to manage-modules.sh script as needed.
    Description=Watch4Net Service
    
    [Service]
    ExecStart=/opt/APG-7.7.0.3/bin/manage-modules.sh service start all
    ExecStop=/opt/APG-7.7.0.3/bin/manage-modules.sh service stop all
    
    [Install]
    WantedBy=multi-user.target
    
    systemctl daemon-reload
    
    systemctl enable watch4net
  • Load the new Watch4Net service definition file
    systemctl daemon-reload
  • Activate the Watch4Net service
    systemctl enable watch4net