tis-fusioninventoryagent
2.6-1
FusionInventory is software for inventory and maintenance of a computer park
2397 downloads

Description
- package : tis-fusioninventoryagent
- version : 2.6-1
- architecture : x64
- categories :
- maintainer : Simon Fonteneau
- description : FusionInventory is software for inventory and maintenance of a computer park
- locale :
- target_os : windows
- min_wapt_version : 1.5.1.20
- sources :
- installed_size : 48435200
- impacted_process :
- description_fr : FusionInventory est un logiciel servant à l'inventaire et la maintenance d'un parc informatique
- description_pl :
- description_de :
- description_es :
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor :
- licence :
- signature_date : 2020-11-26T16:57:44.095358
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
parameters = '/S /acceptlicense /server="http://glpi/glpi/plugins/fusioninventory/" /execmode=service /no-ssl-check /runnow'
key='FusionInventory-Agent'
def install():
print('installing Fusion inventory agent')
versionpaquet = control['version'].split('-',1)[0]
install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key=key,min_version=versionpaquet)
def update_package():
import json
proxies = {}
if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
if proxywapt :
proxies = {'http':proxywapt,'https':proxywapt}
filenamex64,url64 = [(str(p['name']),str(p['browser_download_url'])) for p in json.loads(wgets('https://api.github.com/repos/fusioninventory/fusioninventory-agent/releases/latest',proxies=proxies))['assets'] if 'windows-x64' in p['name'] if not 'portable' in p['name'] ][0]
for fileexe in glob.glob('fusioninventory-agent_windows-x86*.exe'):
if fileexe != filenamex64 :
print('Delete ' + fileexe)
remove_file(fileexe)
if not isfile(filenamex64):
print('Download ' + url64)
wget(url64,filenamex64,proxies=proxies)
from waptpackage import PackageEntry
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
pe.version = get_file_properties(filenamex64)['ProductVersion'] + '-0'
pe.save_control_to_wapt(os.getcwd())
if __name__ == '__main__':
update_package()