tis-glpi-agent-config-template icon

GLPI Agent Config

Silent install package for GLPI Agent Config

7
Utilities
Utilities

Configuration procedure:

Two packages are required to operate GLPI Agent through the WAPT console: tis-glpi-agent-config-template and tis-glpi-agent.

tis-glpi-agent-config-template

https://wapt.tranquil.it/store/en/tis-glpi-agent-config-template

  • Download the "tis-glpi-agent-config-template" package.
  • Private Repository > tis-glpi-agent-config-template > right-click > launch update_package.
  • Click OK on the message indicating that the update-package() function has been launched.
  • Once the window is displayed, tick "upload directly", select a package maturity, note your package prefix and tick "increment package version".
  • Click on ‘Run update-package for selected packages’.
  • Fill in the url of your GLPI server
  • Click OK on the message indicating the path of the configuration
  • Install the new package on the client workstations.

tis-glpi-agent

https://wapt.tranquil.it/store/en/tis-glpi-agent

  • This package is in the tis-glpi-agent-config-template dependencies so it will automatically install with tis-glpi-agent-config-template

Usage Procedure:

  • Install the tis-glpi-agent on the client machines.
  • Install the customized GLPI Agent configuration package.

Preprod packages are packages built on LUTI. They remain in PREPROD usually for 5 days, after which a second VirusTotal scan is performed to verify that the status has not changed.
If the package passes this last check, it is promoted to PROD and published on the store.

  • package: tis-glpi-agent-config-template
  • name: GLPI Agent Config
  • version: 7
  • categories: Utilities
  • maintainer: WAPT Team,Tranquil IT
  • locale: all
  • target_os: all
  • architecture: all
  • signature_date:
  • size: 9.31 Ko
  • homepage : https://www.glpi-project.org/

package           : tis-glpi-agent-config-template
version           : 7
architecture      : all
section           : base
priority          : optional
name              : GLPI Agent Config
categories        : Utilities
maintainer        : WAPT Team,Tranquil IT
description       : Minimum config for GLPI Agent - adds the GLPI server URL to the config. Please refer to the official GLPI website for more information on the configuration.: https://glpi-agent.readthedocs.io/en/latest/configuration.html
depends           : 
conflicts         : 
maturity          : PREPROD
locale            : all
target_os         : all
min_wapt_version  : 2.3
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : Configuration minimale pour l'agent GLPI : ajoute l'URL du serveur GLPI à la configuration. Veuillez consulter le site web officiel de GLPI pour plus d'informations sur la configuration : https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_pl    : Minimalna konfiguracja agenta GLPI - dodaje adres URL serwera GLPI do konfiguracji. Więcej informacji na temat konfiguracji można znaleźć na oficjalnej stronie GLPI: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_de    : Minimale Konfiguration für den GLPI-Agenten - fügt die GLPI-Server-URL zur Konfiguration hinzu. Weitere Informationen zur Konfiguration finden Sie auf der offiziellen GLPI-Website: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_es    : Configuración mínima para el agente GLPI: agrega la URL del servidor GLPI a la configuración. Para obtener más información sobre la configuración, consulte el sitio web oficial de GLPI: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_pt    : Configuração mínima para o Agente GLPI - adiciona o URL do servidor GLPI à configuração. Consulte o site oficial do GLPI para obter mais informações sobre a configuração: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_it    : Configurazione minima per GLPI Agent: aggiunge l'URL del server GLPI alla configurazione. Per ulteriori informazioni sulla configurazione, consultare il sito web ufficiale di GLPI: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_nl    : Minimale configuratie voor GLPI Agent - voegt de URL van de GLPI-server toe aan de configuratie. Raadpleeg de officiële GLPI-website voor meer informatie over de configuratie: https://glpi-agent.readthedocs.io/en/latest/configuration.html
description_ru    : Минимальная конфигурация для GLPI Agent — добавляет URL-адрес сервера GLPI в конфигурацию. Для получения дополнительной информации о конфигурации обратитесь к официальному сайту GLPI: https://glpi-agent.readthedocs.io/en/latest/configuration.html
audit_schedule    : 
editor            : 
keywords          : GLPI
licence           : 
homepage          : https://www.glpi-project.org/
package_uuid      : 2c78b5c2-639c-4d96-b9d5-0e9da6cc2c6d
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : ff336ad8093a16abe7028748cdebfd0b9e789dd85f0b38d35d3dbdadbc8b6e97
signer            : test
signer_fingerprint: b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e
signature_date    : 2026-05-07T14:12:41.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : ncUXY9lxpGzA9q6VyO/UlThZdNq4H8H7Ktv8BaZNN0FwmiiUhyguSNd0gb+NYzINW9K2F3q+GcHNKnBAKxzKv/ffaYBw5s3y6BiOj7V/joBU/bj6LFMiUKWYGEtL/lpn2NRBlmhGT2aOs1DWjvG8G18nKTQbNKnBsZI+liCtLRx9130zeJQqJ3MPNGvm+9Uxtwm+IWUZ+yhK7g+jRj7H4VifSXmPWCTsREyKaxLV1RtzJYAtgBIUOLw+tIPq1rNCnIgy33ipPfztsusNAHbiPcW4TsMfsJ6XYpAqYh3nre5s6AF2CuAs56x/nzavP7I2Gi9EelMakqd4h5UBmCG/aA==

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *

def install():
    if not params.get("install_with_luti", False):
        if not is_installed('tis-glpi-agent'):
            error('tis-glpi-agent package is required to continue.')

        file = makepath("glpi_server.txt")
        with open(file, 'r') as f:
            glpi_server = f.read()

        if get_os_name() == "Windows":
            #Ecrire la clé de registre
            registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\GLPI-Agent', 'server', glpi_server)

            #Redémarrer le service
            if service_is_running("GLPI Agent"):
                service_stop("GLPI Agent")
                service_start("GLPI Agent")
            else:
                service_start("GLPI Agent")

            print("Configuration complete")

        elif get_os_name() == "Linux":
            #Ecrire le fichier de config
            #Variables
            key = 'server'
            glpi_config_path = '/etc/glpi-agent/agent.cfg'

            with open(glpi_config_path, 'r') as f:
                content = f.read()

            pattern = any(line.strip().startswith(f'{key} =') for line in content.splitlines())

            # Ajouter ou modifier le paramètre server
            if not pattern:
                with open(glpi_config_path, 'a') as f:
                    f.write(f'\n# ADD by tis-glpi-agent-template\n{key} = {glpi_server}\n')
            else:
                for line in content.splitlines():
                    if line.strip().startswith(f'{key} ='):
                        new_config = content.replace(line, f'\n# ADD by tis-glpi-agent-template\n{key} = {glpi_server}\n')
                        with open(glpi_config_path, 'w') as f:
                            f.write(new_config)
                    
            #Redémarrer le service
            systemd_restart_service("glpi-agent")

            print("Configuration complete")

        else: #OS must be Darwin
            #Ecrire le fichier de config
            #Variables
            glpi_config_path = '/Applications/GLPI-Agent/etc/agent.cfg'
            key = 'server'
        
            with open(glpi_config_path, 'r') as f:
                content = f.read()

            pattern = any(line.strip().startswith(f'{key} =') for line in content.splitlines())

            # Ajouter ou modifier le paramètre server
            if not pattern:
                with open(glpi_config_path, 'a') as f:
                    f.write(f'\n# ADD by tis-glpi-agent-template\n{key} = {glpi_server}\n')
            else:
                for line in content.splitlines():
                    if line.strip().startswith(f'{key} ='):
                        new_config = content.replace(line, f'\n# ADD by tis-glpi-agent-template\n{key} = {glpi_server}\n')
                        with open(glpi_config_path, 'w') as f:
                            f.write(new_config)

            #Redémarrer le service
            systemd_restart_service("glpi-agent")

            print("Configuration complete")

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *

def update_package():    
    file = makepath(basedir, "glpi_server.txt")    

    if not params.get("install_with_luti", False):
        from waptguihelper import message_dialog, input_dialog, MB_OK
        glpi_server = input_dialog('GLPI Server', 'Please give ip or dns name of your GLPI Server :', 'https://glpi.mydomain.lan')
        message_dialog("Configuration","Note that this package does only minimum configuration with server URL. Please refer to the official GLPI website for more information about the configuration.: https://glpi-agent.readthedocs.io/en/latest/configuration.html", MB_OK)

        with open(file, 'w') as f:
            f.write(glpi_server)

        control.package = control.package.replace('-template', '')
        control.save_control_to_wapt()

204672b3390af1f260e861dcac7cf5db0f776c88d088b334ce6188b80c0eaae6 : WAPT/README.md
3d8ce3e1fe44f0229faf7fbca7ddc4fc2979ee9316111db14229585ee2b67c4e : WAPT/README_fr.md
01ca7fe94636e5a08fcb73849d3b5df25d51e2c82f4dd1a08f01798b25899819 : WAPT/certificate.crt
bca1ad3829bb2bade3fc97d0fc779e1145c6492b462a69df4caae833c2cb10f4 : WAPT/control
ff336ad8093a16abe7028748cdebfd0b9e789dd85f0b38d35d3dbdadbc8b6e97 : WAPT/icon.png
2f87705f647671c800cc97af0484cd188450feac57f60d4d41e4a6a84096504a : luti.json
8322d4015316e347110cfab848e5508581f367fb44ccb0c8d33e52ca02babb2f : setup.py
30401a5fad77750e01f13765f8aa4bd056cbf781b634618aa8680f8eb6d2fb97 : update_package.py