eTrk Linux Agent Installation

Prerequisites

.NET Runtime (version 8.0)

  • Linux Users (Ubuntu): Install the .NET Runtime via the package manager using the following command

    command:

    sudo apt-get install -y dotnet-runtime-8.0
    

Clone the Repository

git clone https://github.com/Kumaran-eTrk/LinuxAgent.git

Procedure

Configurations :

Modify the necessary configurations in config.ini file.

├── config
  • config.ini

Note

Add the ProductKey generated through the Web Portal. This key is utilized for security purposes to securely transmit data from this application to the server.

Build the application :

navigate to cd src and run the command

python3 setup.py sdist bdist_wheel or python setup.py sdist bdist_wheel

Installation :

After the build, take the dist folder from src folder.

– run the given .ssh script file:

`source linux.sh 2>&1 | tee output.log`

–To active python virtual env:

`source /usr/local/share/usermonitor/.venv/bin/activate`

– navigate (linuxdist folder):

`cd dist`

– Install a package named MonitorUser from a wheel file.:

`pip install MonitorUser-0.1-py3-none-any.whl`

– If you want to uninstall a package, use:

`pip uninstall MonitorUser-0.1-py3-none-any.whl`

Trigger the Agent Service file

Once you completed the installation , start the ``usermonitor.service ``file, becasue the service

– Start the service:

`sudo systemctl start usermonitor.service`

– Check the status of the service:

`sudo systemctl status usermonitor.service`

– Stop the service:

`sudo systemctl stop usermonitor.service`

Enable or Disable Agent Service file

– Enable the service to start automatically on boot:

`sudo systemctl enable usermonitor.service`

—Disable the service to prevent it from starting automatically on boot:

`sudo systemctl disable usermonitor.service`

eTrk Linux Service Installation

This service code is responsible for triggering the agent code service when it stops. It checks the agent code process every minute, and if it’s found to be stopped, the service will automatically restart the agent.

Clone the Repository

git clone https://github.com/Kumaran-eTrk/LinuxService.git

Procedure

Configurations

Modify the necessary configurations in config.ini file.

├── config
  • config.ini

  1. Virtual Name(Optional)

    Replace your virtual env of the linux agent to updates the new versions in the future.

  2. Service Name :

    Replace your service file name of your linux agent to restart the agent.

Build the application

navigate to cd src and run the command:

python3 setup.py sdist bdist_wheel or python setup.py sdist bdist_wheel

Installation :

After the build, take the dist folder from src folder.

– run the given .ssh script file:

`source monservice.sh 2>&1 | tee output.log`

–To active python virtual env:

`source /usr/local/share/Usermonservice/.monservice/bin/activate`

– navigate (linuxdist folder):

`cd dist`

– Install a package named MonitorUser from a wheel file.:

`pip install MonitorService-0.1-py3-none-any.whl`

– If you want to uninstall a package, use:

`pip uninstall MonitorService-0.1-py3-none-any.whl`

Trigger the Service file

Once you completed the installation , start the ``monservice.service ``file, becasue the service

– Start the service:

`sudo systemctl start monservice.service`

– Check the status of the service:

`sudo systemctl status monservice.service`

– Stop the service:

`sudo systemctl stop monservice.service`

Enable or Disable Service file

– Enable the service to start automatically on boot:

`sudo systemctl enable monservice.service`

—Disable the service to prevent it from starting automatically on boot:

`sudo systemctl disable monservice.service`