Last active
February 19, 2024 15:23
-
-
Save r4phf43l/eb66389680a802ca0cd2876e9757eb47 to your computer and use it in GitHub Desktop.
Update GLPI
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 | |
echo "INICIANDO A ATUALIZACAO" | |
rm -r update-glpi/* | |
mkdir update-glpi | |
echo "BACKUP DOS ARQUIVOS" | |
mv $(echo * | sed s:update-glpi::g) update-glpi | |
echo "APAGANDO ARQUIVOS DA INSTALACAO ANTERIOR" | |
find . -maxdepth 1 -not -name 'update-glpi*' -delete | |
echo "BAIXANDO A ULTIMA VERSAO" | |
wget https://github.com/glpi-project/glpi/releases/download/10.0.12/glpi-10.0.12.tgz | |
echo "DESCOMPACTANDO" | |
tar -xvzf glpi-10.0.12.tgz | |
echo "PREPARANDO AMBIENTE" | |
cp -r glpi/* . | |
echo "LIMPANDO" | |
rm *.tgz | |
rm -r glpi config files plugins marketplace | |
echo "RECUPERANDO BACKUP" | |
cp -r update-glpi/config . | |
cp -r update-glpi/files . | |
cp -r update-glpi/plugins . | |
cp -r update-glpi/marketplace . | |
cp -r update-glpi/custom-pmmg . | |
echo "AJUSTANDO PERMISSOES" | |
chmod -R 777 files config plugins marketplace | |
##echo -e "# /var/www/glpi/\nRewriteBase /\nRewriteEngine On\nRewriteCond %{REQUEST_URI} !^/public\nRewriteRule ^(.*)$ public/index.php [QSA,L]" > .htaccess | |
echo "ATUALIZACAO CONCLUIDA - VERIFIQUE NO NAVEGADOR OS PROXIMOS PASSOS." | |
echo "APOS CONCLUIDO EXCLUA MANUALMENTE A PASTA UPDATE-GLPI E A PASTA INSTALL." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script simples para atualizar o GLPI