tis-fusioninventory 2.3.21-2

  • package : tis-fusioninventory
  • version : 2.3.21-2
  • description : FusionInventory est un logiciel servant à l'inventaire et la maintenance d'un parc informatique
  • maintainer : Simon Fonteneau
  • date : 2018-02-27 19:00:26

setup.py

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

uninstallkey = []


serveur = "http://glpi/glpi/plugins/fusioninventory/"

parameters = '/S /acceptlicense /server="%s" /execmode=service /no-ssl-check /runnow' % (serveur)

key='FusionInventory-Agent'

def install():

    print('installing Fusion inventory agent')
    versionpaquet = control['version'].split('-',1)[0]
    if iswin64():
        install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet)
    else:
        install_exe_if_needed("fusioninventory-agent_windows-x86_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet)





def update_package():
    htmlsource = wgets('https://github.com/fusioninventory/fusioninventory-agent/releases').splitlines()
    for line in htmlsource :
        if 'fusioninventory-agent_windows-x64' in line :
            url64 = line[line.find('https') : line.find('exe') + 3]
            version = url64[url64.find('x64_') + 4 : url64.find('.exe')]
            url86 = url64.replace('x64','x86')
            filenamex86 = "fusioninventory-agent_windows-x86_%s.exe" % version
            filenamex64 = "fusioninventory-agent_windows-x64_%s.exe" % version
            break

    print('Latest version : ' + version)

    for fileexe in glob.glob('fusioninventory-agent_windows-x64*.exe'):
        if fileexe != filenamex64 :
            print('Delete ' + fileexe)
            remove_file(fileexe)

    for fileexe in glob.glob('fusioninventory-agent_windows-x86*.exe'):
        if fileexe != filenamex86 :
            print('Delete ' + fileexe)
            remove_file(fileexe)

    if not isfile(filenamex64):
        print('Download ' + url64)
        wget(url64,filenamex64)

    if not isfile(filenamex86):
        print('Download ' + url86)
        wget(url86,filenamex86)

    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    pe.version = version + '-0'
    pe.save_control_to_wapt(os.getcwd())


if __name__ == '__main__':
    update_package()


    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "fba3af4f79be43de12a5f9438a98831edc7a08c5761e5f216eb9d9ca5d98b3ff"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["fusioninventory-agent_windows-x86_2.3.21.exe", "08de922e012bec687f7671bba38906fd024e80e63d593fc39c59e75b57e1a84d"], ["WAPT/wapt.psproj", "c5a1697bf6e134989a9870764995725626a8f5055b640e541b569d1a927363fc"], ["fusioninventory-agent_windows-x64_2.3.21.exe", "302dfa9b6108cf093c0d290b1dabebb328142d6e57c3bfee2b14c835d85afbd0"], ["setup.py", "4fb1e0ea0eb9bb508b6c3a8e8139b53b6a2be22ba0e64f435dabdc663d894831"], ["WAPT/control", "45f82211bf05b0824c414aab716fe95a2d9cd05bb8853e1408f3177a588fdf6c"]]