Merge branch 'master' of ssh://gitea.fws.fr:3222/fws/wapt-fusioninventory

master
Daniel Berteaud 6 years ago
commit f50efea7b4
  1. 45
      WAPT/control
  2. 25
      setup.py

@ -1,33 +1,32 @@
package : fws-fusioninventory package : fws-fusioninventory
version : 2.4.2-4 version : 2.4.2-8
architecture : all architecture : all
section : base section : base
priority : optional priority : optional
maintainer : Kevin Guerineau maintainer : Kevin Guerineau
description : FusionInventory is a software for inventory computers. description : FusionInventory is a computer inventory agent
depends : depends :
conflicts : conflicts :
maturity : maturity : DEV
locale : all locale : all
target_os : windows target_os : windows
min_os_version : 5.0 min_os_version : 5.0
max_os_version : max_os_version :
min_wapt_version : 1.3.12 min_wapt_version : 1.3.12
sources : sources :
installed_size : installed_size :
impacted_process : impacted_process :
description_fr : FusionInventory est un logiciel d'inventaire d'ordinateurs description_fr : FusionInventory est un agent d'inventaire d'ordinateurs
description_pl : description_pl :
description_de : description_de :
description_es : description_es :
audit_schedule : 4w audit_schedule : 4w
editor : editor :
keywords : keywords :
licence : licence : GPLv2+
homepage : homepage : http://fusioninventory.org/
package_uuid : 8151a535-59a4-4951-bb82-c3f7c98644f5 package_uuid :
signer : Daniel Berteaud signer :
signer_fingerprint: 3c9415559e2dedbc4390e3faa2c28d3b67265baa5b35902d2764d9e41c3b3f0a signer_fingerprint:
signature : S189A65mxvE2N/PLheSzz8Hm431rKfUPe7FCUaeybLGeq8R1Z8z6rhgHMm5KU0wdckeAC6lgKsnhQY6rEvedxE7GPtoC3LOLmdUkzj7rjB7rVOObyafJaobjTgJRlDIirK4YBg6/sebuv0SDcBU+IrPt7SRlHjb+q2+S0KlagPsKpFLGBgnXZQZzX0M7t25twZP64S7Zqw0qRjojy3BFdUizvOB47ZwMHZqdGdDnFrIsDHrDcIYsKl/0Cf91Fj0KPTl12F6EhMRllTxoAQOevgP+uEh2gZ78Oq+uEv/IWywTQlp4MIiX16KLjaXerFUjNPjwHwWQgmLDQUUENAfECg== signature_date :
signature_date : 20181123-101110 signed_attributes :
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,signer,signer_fingerprint,signature_date,signed_attributes

@ -5,25 +5,22 @@ import json
uninstallkey = [] uninstallkey = []
print('Reading variables') variables = {
key = open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read() 'fusinv_servers': [ 'https://glpi.lan.local/plugins/fusioninventory' ]
f = Fernet(key) }
variables = json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))
if not 'fusinv_server' in variables: # Read local variables file if available
error('Missing fusinv_server variable') if isfile(makepath(programfiles32,'wapt','private','symetric.txt')) and isfile(makepath(programfiles32,'wapt','private','variables.txt')):
print('Reading local encrypted variables file')
f = Fernet(open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read())
variables = json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))
def install(): def install():
print('Reading variables') parameters = '/S /acceptlicense /server="%s" /execmode=service /runnow' % (','.join(variables['fusinv_servers']))
key = open(makepath(programfiles32,'wapt','private','symetric.txt'),'r').read()
f = Fernet(key)
variables = json.loads(f.decrypt(open(makepath(programfiles32,'wapt','private','variables.txt'),'r').read()))
if not 'fusinv_server' in variables:
error('Missing fusinv_server variable')
parameters = '/S /acceptlicense /server="%s" /execmode=service /runnow' % (variables['fusinv_server'])
if 'fusinv_user' in variables and 'fusinv_pass' in variables: if 'fusinv_user' in variables and 'fusinv_pass' in variables:
parameters = parameters + ' /user="%s" /password="%s"' % (variables['fusinv_user'],variables['fusinv_pass']) parameters = parameters + ' /user="%s" /password="%s"' % (variables['fusinv_user'],variables['fusinv_pass'])
print('installing Fusion inventory agent') print('Installing FusionInventory Agent')
versionpaquet = control['version'].split('-',1)[0] versionpaquet = control['version'].split('-',1)[0]
if iswin64(): if iswin64():
install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key='FusionInventory-Agent',min_version=versionpaquet) install_exe_if_needed("fusioninventory-agent_windows-x64_%s.exe" % versionpaquet,parameters,key='FusionInventory-Agent',min_version=versionpaquet)

Loading…
Cancel
Save