Update : script glpi

This commit is contained in:
Hubert Cornet 2025-04-25 15:53:13 +02:00
parent 2cd2c4c712
commit 8484d6f4ee

View File

@ -21,17 +21,17 @@ install_glpi_agent() {
fi fi
# Install dependencies # Install dependencies
# log_message "INFO" "Installing dependencies for GLPI agent" log_message "INFO" "Installing dependencies for GLPI agent"
# apt-get install -y dmidecode hwdata ucf hdparm perl libuniversal-require-perl \ apt-get install -y dmidecode hwdata ucf hdparm perl libuniversal-require-perl \
# libxml-treepp-perl libyaml-perl libnet-cups-perl libnet-ip-perl libwww-perl \ libxml-treepp-perl libyaml-perl libnet-cups-perl libnet-ip-perl libwww-perl \
# libparse-edid-perl libproc-daemon-perl libfile-which-perl libhttp-daemon-perl \ libparse-edid-perl libproc-daemon-perl libfile-which-perl libhttp-daemon-perl \
# libio-socket-ssl-perl libnet-snmp-perl libcrypt-des-perl libnet-nbname-perl \ libio-socket-ssl-perl libnet-snmp-perl libcrypt-des-perl libnet-nbname-perl \
# libdigest-hmac-perl libdigest-hmac-perl
# if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
# log_message "ERROR" "Failed to install dependencies for GLPI agent" log_message "ERROR" "Failed to install dependencies for GLPI agent"
# return 1 return 1
# fi fi
# Determine the latest GLPI agent version and download URL for Debian/Ubuntu # Determine the latest GLPI agent version and download URL for Debian/Ubuntu
log_message "INFO" "Determining latest GLPI agent version" log_message "INFO" "Determining latest GLPI agent version"
@ -60,7 +60,7 @@ install_glpi_agent() {
log_message "INFO" "Downloading GLPI agent from $DOWNLOAD_URL" log_message "INFO" "Downloading GLPI agent from $DOWNLOAD_URL"
# #
wget "$DOWNLOAD_URL" -O "glpi-agent-$LATEST_VERSION.pl" wget "$DOWNLOAD_URL" -O "glpi-agent-$LATEST_VERSION-linux-installer.pl"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
log_message "ERROR" "Failed to download GLPI agent" log_message "ERROR" "Failed to download GLPI agent"
@ -70,8 +70,8 @@ install_glpi_agent() {
# Install the GLPI agent package # Install the GLPI agent package
log_message "INFO" "Installing GLPI agent package" log_message "INFO" "Installing GLPI agent package"
#dpkg -i glpi-agent_$LATEST_VERSION.deb
perl glpi-agent-$LATEST_VERSION-linux-installer.pl --reinstall --type=all -v >> /dev/null perl glpi-agent-$LATEST_VERSION-linux-installer.pl --reinstall --type=all -v >> /dev/nulls
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
log_message "ERROR" "Failed to install GLPI agent package" log_message "ERROR" "Failed to install GLPI agent package"