update : not good

This commit is contained in:
2025-04-19 21:29:57 +02:00
parent 9d27cb1b59
commit e83894e30e
34 changed files with 1682 additions and 4 deletions

54
-04-agent-glpi/script.sh Normal file
View File

@ -0,0 +1,54 @@
#!/bin/sh
# Pour install l'agent GLPI
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NOCOLOR='\033[0m'
echo "${YELLOW} ** ${NOCOLOR} Début du script : 04-glpi"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Déclaration du proxy"
echo "${NOCOLOR}"
export http_proxy='http://serv-proxy.fr.dgs.group:3128'
export https_proxy='http://serv-proxy.fr.dgs.group:3128'
export ftp_proxy='http://serv-proxy.fr.dgs.group:3128'
echo "${YELLOW} * ${NOCOLOR} Déclaration du proxy : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Installation Wget"
echo "${NOCOLOR}"
apt install -y wget >> /dev/null
echo "${YELLOW} * ${NOCOLOR}Installation Wget : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Copie du certificat"
echo "${NOCOLOR}"
cp 04-agent-glpi/root-ca.cer /etc/ssl/certs/root-ca.cer >> /dev/null
echo "${YELLOW} * ${NOCOLOR} Copie du certificat : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Telechargement de l'installer"
echo "${NOCOLOR}"
wget https://github.com/glpi-project/glpi-agent/releases/download/1.11/glpi-agent-1.11-linux-installer.pl >> /dev/null
echo "${YELLOW} * ${NOCOLOR} Telechargement de l'installer : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} * ${NOCOLOR} Installation"
echo "${NOCOLOR}"
perl glpi-agent-1.11-linux-installer.pl --reinstall -s "https://glpi.fr.dgs.group/marketplace/glpiinventory/" -t "ServeurProd" --ca-cert-file=/etc/ssl/certs/root-ca.cer --type=all -v >> /dev/null
echo "${YELLOW} * ${NOCOLOR} Installation : ${GREEN} OK"
echo "${NOCOLOR}"
echo "${YELLOW} ** ${NOCOLOR} Fin du script : 04-glpi"
echo "${NOCOLOR}"