mirror of
https://github.com/DiouxX/docker-glpi.git
synced 2026-11-08 07:52:32 -05:00
Use GitHub API to retrieve the release download url
This commit is contained in:
1 parent
339ff3a2b4
commit
0dbd0e33e9
2 files changed
+5
-4
No files matched your search
+2
-1
@@ -23,7 +23,8 @@ php-mbstring \
|
|||||||
php-xml \
|
php-xml \
|
||||||
php-apcu-bc \
|
php-apcu-bc \
|
||||||
cron \
|
cron \
|
||||||
wget
|
wget \
|
||||||
|
jq
|
||||||
|
|
||||||
#Copie et execution du script pour l'installation et l'initialisation de GLPI
|
#Copie et execution du script pour l'installation et l'initialisation de GLPI
|
||||||
COPY glpi-start.sh /opt/
|
COPY glpi-start.sh /opt/
|
||||||
|
|||||||
+3
-3
@@ -8,8 +8,8 @@ if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset";
|
|||||||
else echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.0/apache2/conf.d/timezone.ini;
|
else echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.0/apache2/conf.d/timezone.ini;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SRC_GLPI="https://github.com/glpi-project/glpi/releases/download/${VERSION_GLPI}/glpi-${VERSION_GLPI}.tgz"
|
SRC_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/tags/${VERSION_GLPI} | jq .assets[0].browser_download_url | tr -d \")
|
||||||
TAR_GLPI=glpi-${VERSION_GLPI}.tgz
|
TAR_GLPI=$(basename ${SRC_GLPI})
|
||||||
FOLDER_GLPI=glpi/
|
FOLDER_GLPI=glpi/
|
||||||
FOLDER_WEB=/var/www/html/
|
FOLDER_WEB=/var/www/html/
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Téléchargement et extraction des sources de GLPI
|
#Téléchargement et extraction des sources de GLPI
|
||||||
if [ "$(ls ${FOLDER_WEB}${FOLDER_GLPI})" ];
|
if [ -d "${FOLDER_WEB}${FOLDER_GLPI}" ];
|
||||||
then
|
then
|
||||||
echo "GLPI is already installed"
|
echo "GLPI is already installed"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user