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 : 2017-09-13 10:18:59
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170913-101859
  • min_os_version :
  • min_wapt_version :

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()


    

manifest

[["WAPT/icon.png", "0d82bcad06f39863c7a74254672667a87d308f16"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["fusioninventory-agent_windows-x86_2.3.21.exe", "77dc61c0c19d1549ab48c8724c1b0b3aa7e32373"], ["WAPT/wapt.psproj", "7ccbe65afd42ee7794a86ed74eef48e3f5812c93"], ["fusioninventory-agent_windows-x64_2.3.21.exe", "51af93925cf1b90c1901479d1c1e06d21b225387"], ["setup.py", "efe528924a45cd753391cdbf3edf7db801a9540c"], ["WAPT/control", "800ae7bff9455fd3f1376e34a11fd5b16a5b2a63"]]