Update : script glpi
This commit is contained in:
parent
2cd2c4c712
commit
8484d6f4ee
@ -21,17 +21,17 @@ install_glpi_agent() {
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
# log_message "INFO" "Installing dependencies for GLPI agent"
|
||||
# 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 \
|
||||
# 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 \
|
||||
# libdigest-hmac-perl
|
||||
log_message "INFO" "Installing dependencies for GLPI agent"
|
||||
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 \
|
||||
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 \
|
||||
libdigest-hmac-perl
|
||||
|
||||
# if [ $? -ne 0 ]; then
|
||||
# log_message "ERROR" "Failed to install dependencies for GLPI agent"
|
||||
# return 1
|
||||
# fi
|
||||
if [ $? -ne 0 ]; then
|
||||
log_message "ERROR" "Failed to install dependencies for GLPI agent"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Determine the latest GLPI agent version and download URL for Debian/Ubuntu
|
||||
log_message "INFO" "Determining latest GLPI agent version"
|
||||
@ -60,7 +60,7 @@ install_glpi_agent() {
|
||||
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
|
||||
log_message "ERROR" "Failed to download GLPI agent"
|
||||
@ -70,8 +70,8 @@ install_glpi_agent() {
|
||||
|
||||
# Install the 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
|
||||
log_message "ERROR" "Failed to install GLPI agent package"
|
||||
|
Loading…
x
Reference in New Issue
Block a user