Skip to content

Instantly share code, notes, and snippets.

@samirfor
Last active September 27, 2019 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samirfor/cdd6e388e3de44bff50ff94bd1e90eb9 to your computer and use it in GitHub Desktop.
Save samirfor/cdd6e388e3de44bff50ff94bd1e90eb9 to your computer and use it in GitHub Desktop.
Instala o fusioninventory-agent no Ubuntu
#!/bin/bash
set -e
#############################################
# Instala o fusioninventory-agent no Ubuntu #
#############################################
HOST_GLPI="glpi.ifce.taua"
[ "$(whoami)" != "root" ] && echo "Precisa ser root" && exit 1
apt-get -y install dmidecode hwdata ucf hdparm \
perl libuniversal-require-perl libwww-perl libparse-edid-perl \
libproc-daemon-perl libfile-which-perl \
libxml-treepp-perl libyaml-perl libnet-cups-perl libnet-ip-perl \
libdigest-sha-perl libsocket-getaddrinfo-perl libtext-template-perl \
libhttp-daemon-perl
cd /tmp
wget -c "https://github.com/fusioninventory/fusioninventory-agent/releases/download/2.5.1/fusioninventory-agent_2.5.1-1_all.deb" --no-check-certificate -O fusioninventory.deb
dpkg -i fusioninventory.deb || /bin/true
apt -fy install
echo "server = http://$HOST_GLPI/glpi/plugins/fusioninventory/" >> /etc/fusioninventory/agent.cfg
systemctl enable fusioninventory-agent
systemctl restart fusioninventory-agent
rm -rf fusioninventory.deb
cd -
fusioninventory-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment