Skip to content
Snippets Groups Projects
Verified Commit 8758f646 authored by David Beniamine's avatar David Beniamine
Browse files

Install glpi_agent

parent 074bf941
Branches
No related tags found
No related merge requests found
#!/bin/bash
VERSION=1.11
glpiver=$(dpkg -l | awk '/\sglpi-agent\s/{print $3}' | cut -d : -f 2 | cut -d - -f 1)
refip=$(ip a | awk '/inet 10\./{print $2}' | sed 's@/[0-9][0-9]$@@')
if [ "$glpiver" != "$VERSION" ]; then
cd /tmp
wget -O glpi-agent.pl https://github.com/glpi-project/glpi-agent/releases/download/$VERSION/glpi-agent-$VERSION-linux-installer.pl
perl /tmp/glpi-agent.pl --server=https://glpi.grenoble.fr/plugins/glpiinventory/ --tag=$refip --install --service --tasks=inventoy,deploy,inventory,NetDiscovery,NetInventory --type=all --runnow
rm glpi-agent.pl
glpi-agent
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment