[Wapt] Correction setuphelpers_linux.py sur la prochaine update

Jordi Morillo j.morillo at yeswehack.com
Ven 18 Mar 16:53:44 CET 2022


Encore moi :)

Pourriez-vous ajouter le pti "patch" de Denis dans setuphelpers_linux.py 
lors de la prochaine MAJ du Linux agent svp ? :)

/def running_on_ac()/

/    return False/

J'essai actuellement d'upgrade tous mes agents en 2.2 avec le package 
suivant:

//

/# -*- coding: utf-8 -*- from setuphelpers import * def install(): if 
type_debian(): install_apt('lsb-release') run('echo "deb [arch=amd64] 
https://wapt.tranquil.it/%s/wapt-2.2/ $(lsb_release -c -s) main" > 
/etc/apt/sources.list.d/wapt.list' % get_distrib_linux().lower()) 
inifile_writestring(WAPT.config_filename, 'global', 
'waptservice_admin_filter', 'True') 
inifile_writestring(WAPT.config_filename, 'global', 'service_auth_type', 
'waptserver-ldap') inifile_writestring(WAPT.config_filename, 'global', 
'waptaudit_task_period', '1h') inifile_writestring(WAPT.config_filename, 
'global', 'allow_remote_reboot', 1) 
inifile_writestring(WAPT.config_filename, 'global', 
'allow_remote_shutdown', 1) update_apt() run('apt install -y 
--only-upgrade tis-waptagent') 
filecopyto('setuphelpers_linux.py','/opt/wapt/setuphelpers_linux.py') /

//

Sauf qu'au moment de l'upgrade de tis-waptagentt, il y a un restart du 
service qui est effectué, du coup je ne passe pas à filecopyto...
Je pourrais bien faire des bidouille genre je copie le fichier dans /tmp 
et je joue avec la commande "at" mais ça commence a faire vraiment de la 
bidouille très crade...

Merci d'avance et bon week-end !

//

-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.wapt.fr/pipermail/wapt/attachments/20220318/47097e9a/attachment.htm>


Plus d'informations sur la liste de diffusion WAPT