Created
March 9, 2022 19:01
-
-
Save brahimmachkouri/5f24f71d42baf842e25db40efe467c53 to your computer and use it in GitHub Desktop.
Automatic installation of the latest version of fusioninventory in GLPI plugins directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
githubproject="https://github.com/fusioninventory/fusioninventory-for-glpi/releases/latest/" | |
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject) | |
version=${url##*/} | |
tag=${version:4} | |
wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/$version/fusioninventory-$tag.tar.bz2 | |
glpi_install=$(find /var -type f -name glpicrypt.key | sed -E 's/\/config\/glpicrypt\.key//') | |
tar xvf fusioninventory-$tag.tar.bz2 -C "$glpi_install/plugins/" | |
chown -R www-data:www-data "$glpi_install/plugins/fusioninventory" | |
rm fusioninventory-$tag.tar.bz2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment