gsb2023/pre/inst-depl
2023-01-05 11:44:26 +01:00

94 lines
2.2 KiB
Bash

#!/bin/bash
## ps : 2021-04-01 15:25
set -o errexit
set -o pipefail
GITUSR=gitgsb
GITPRJ=gsb2022
apt update && apt upgrade
apt install -y apache2 git
STOREREP="/var/www/html/gsbstore"
GLPIREL=9.5.6
str="wget -nc https://github.com/glpi-project/glpi/releases/download/${GLPIREL}/glpi-${GLPIREL}.tgz"
FIREL=9.5
str2="https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi9.5%2B3.0/fusioninventory-9.5+3.0.tar.bz2"
FIAGREL=2.6
str31="wget -nc https://github.com/fusioninventory/fusioninventory-agent/releases/download/${FIAGREL}/fusioninventory-agent_windows-x64_${FIAGREL}.exe"
str32="wget -nc https://github.com/fusioninventory/fusioninventory-agent/releases/download/${FIAGREL}/fusioninventory-agent_windows-x86_${FIAGREL}.exe"
FOGREL=1.5.9
str4="wget -nc https://github.com/FOGProject/fogproject/archive/${FOGREL}.tar.gz -O fogproject-${FOGREL}.tar.gz"
WPREL=5.8.2
str5="wget -nc https://fr.wordpress.org/wordpress-${WPREL}-fr_FR.tar.gz"
GOSSVER=v0.3.16
str6="curl -L https://github.com/aelsabbahy/goss/releases/download/${GOSSVER}/goss-linux-amd64 -o goss"
DOCKERREL=1.29.2
str7="curl -L https://github.com/docker/compose/releases/download/${DOCKERREL}/docker-compose-$(uname -s)-$(uname -m) -o docker-compose"
GESTSUPREL=3.2.15
str8="wget -nc https://gestsup.fr/downloads/versions/current/version/gestsup_${GESTSUPREL}.zip"
ELKREL=7.16.3
str81="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-amd64.deb"
str82="wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-${ELKREL}-windows-x86_64.zip"
str83="wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-windows-x86_64.zip"
str84="wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-${ELKREL}-amd64.deb"
[[ -d "${STOREREP}" ]]|| mkdir "${STOREREP}"
(cat <<EOT > "${STOREREP}/getall"
#!/bin/bash
${str}
${str2}
${str31}
${str32}
${str4}
${str5}
${str6}
chmod +x ./goss
curl -L https://get.docker.com -o getdocker.sh
chmod +x ./getdocker.sh
${str7}
chmod +x ./docker-compose
wget -nc https://github.com/FiloSottile/mkcert/releases/download/v1.4.3/mkcert-v1.4.3-linux-amd64 -O mkcert
chmod +x ./mkcert
${str8}
${str81}
${str82}
${str83}
${str84}
EOT
)
cat "${STOREREP}/getall"