tis-glpi-agent

1.11-3
The GLPI Agent is a generic management agent. It can perform a certain number of tasks, according to its own execution plan, or on behalf of a GLPI server acting as a control point.
17785 downloads
Download
See build result See VirusTotal scan
tis-glpi-agent icon
  • package : tis-glpi-agent
  • name : GLPI Agent
  • version : 1.11-3
  • categories :
  • maintainer : Simon Fonteneau
  • installed_size : 72138232
  • editor :
  • licence : GPL-2.0
  • signature_date : 2024-12-15T21:29:17.000000
  • size : 21.73 Mo
  • locale : all
  • target_os : darwin
  • impacted_process : glpi-agent
  • architecture : arm
  • Homepage : https://github.com/glpi-project/glpi-agent
package           : tis-glpi-agent
version           : 1.11-3
architecture      : arm
section           : base
priority          : optional
name              : GLPI Agent
categories        : 
maintainer        : Simon Fonteneau
description       : The GLPI Agent is a generic management agent. It can perform a certain number of tasks, according to its own execution plan, or on behalf of a GLPI server acting as a control point.
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : darwin
min_wapt_version  : 2.0
sources           : 
installed_size    : 72138232
impacted_process  : glpi-agent
description_fr    : L'Agent GLPI est un agent de gestion générique. Il peut effectuer un certain nombre de tâches, selon son propre plan d'exécution, ou pour le compte d'un serveur GLPI faisant office de point de contrôle.
description_pl    : 
description_de    : 
description_es    : 
description_pt    : 
description_it    : 
description_nl    : 
description_ru    : 
audit_schedule    : 
editor            : 
keywords          : glpi
licence           : GPL-2.0
homepage          : https://github.com/glpi-project/glpi-agent
package_uuid      : 2d86b677-7790-44be-9219-21c92a4e76a1
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : ff336ad8093a16abe7028748cdebfd0b9e789dd85f0b38d35d3dbdadbc8b6e97
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-12-15T21:29:17.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         : heXGZ5fTvMpDrtBqBwT1/GAQ5DeT6aYrLKfkR+s2knGDRPcZhDebJXGuUf1CqAz4bNqCxGbgjx8zzrZz+HpSmiU6yTtlL0FrKtBqcaHjeUwnZz6esS6xJEMHMN5G+VWkemw3aTw1LeOV/m6mI80b5CfBRUIpFyNkOo5S4Iq9GOkity3HydcpNpyfqWeGRSgPTnCQnl9km+N47d8ZXcIZEET97IZ4VWfj2SZ/RVIwZgbdseKQIYyzhmjlWr9qcw4Ewo/wLOqtN68dCtkllv6Zvx52fvHyiVhfj1RG3FqEMvPMj4p8/fSXdKmbx4dPChmXqGHSW7liTQzrhrp89D/O0g==
# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    
    if installed_softwares('org.glpi-project.glpi-agent'):
        uninstall_pkg('org.glpi-project.glpi-agent')

    install_pkg(
        glob.glob("*.pkg")[0],
        key='pkgid:com.teclib.glpi-agent',
        min_version=control.get_software_version()
    )

def uninstall():
    files_to_delete = [
        "/Applications/GLPI-Agent",
        "/var/log/glpi-agent.log",
        "/usr/local/bin/dmidecode",
        "/Library/LaunchDaemons/com.teclib.glpi-agent.plist"
    ]
    for file in files_to_delete:
        if isfile(file):
            remove_file(file)
        remove_tree(file, ignore_errors=True)
# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *


def update_package():
    # Declaring local variables
    package_updated = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    app_name = control.name

    url_api = "https://api.github.com/repos/glpi-project/glpi-agent/releases/latest"

    releases = wgets(url_api, proxies=proxies, as_json=True)
    version = releases['tag_name']

    os_dict = {
        "windows-x64": f"GLPI-Agent-{version}-x64.msi",
        "darwin-arm": f"GLPI-Agent-{version}_arm64.pkg",
        "darwin-x64": f"GLPI-Agent-{version}_x86_64.pkg",
        "debian_based-all": f"glpi-agent_{version}-1_all.deb",
        "redhat_based-all": f"glpi-agent-{version}-1.noarch.rpm",
    }

    os_type = control.target_os + "-" + ensure_list(control.architecture)[0]

    for download in releases["assets"]:
        if download["name"] == os_dict[os_type]:
            download_url = download["browser_download_url"]
            latest_bin = download_url.rsplit("/", 1)[-1]
            latest_bin_extension = latest_bin.rsplit(".", 1)[-1]
            break

    # Downloading latest binaries
    print(f"Latest {app_name} version is: {version}")
    print(f"Download URL is: {download_url}")
    if not isfile(latest_bin):
        print(f"Downloading: {latest_bin}")
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print(f"latest_bin is present: {latest_bin}")

    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print(f"Software version updated (from: {control.get_software_version()} to: {Version(version)})")
        package_updated = True
    else:
        print(f"Software version up-to-date ({Version(version)})")

    for f in glob.glob(f'*.{latest_bin_extension}'):
        if f != latest_bin:
            remove_file(f)

    control.set_software_version(version)
    control.save_control_to_wapt()

    return package_updated
100af920e61601f8853d29d9c2b9e2623534e2430d98bbc504f4da6f4f5ed962 : GLPI-Agent-1.11_arm64.pkg
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
614494303760ef406a5bb1b5347a330f3abcaf63adc8d7eaed6abe536451b85f : WAPT/control
ff336ad8093a16abe7028748cdebfd0b9e789dd85f0b38d35d3dbdadbc8b6e97 : WAPT/icon.png
c6246be77fa0d87cb8860fc9de433dfc02b56edaaca368712d5b6267141eeee4 : WAPT/wapt.psproj
d99d253c30d34dc31a71c33323b2111b6f00cc4cd8372e00f6531497e6b45fb2 : luti.json
a0092d774e65c11e745c590831f03eaf4550ca888a93b91880cbe3d8d17feab8 : setup.py
1212aed63741871708232abac417ed35c55ff9602afe1ece0e32cb90a27fe4e1 : update_package.py