Skip to content

Commit

Permalink
fix: marketplace folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdotcosta committed Sep 5, 2023
1 parent 9813a69 commit d3f000e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
2 changes: 2 additions & 0 deletions src/main/core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ARG GLPI_FILES_DIR=/var/lib/glpi
ARG GLPI_LOG_DIR=/var/log/glpi
ARG HTTP_WWW=/var/www/html
ARG GLPI_WWW=${HTTP_WWW}/glpi
ARG GLPI_MARKETPLACE_DIR=${GLPI_WWW}/marketplace
ARG LOCAL_INSTALLATION_FOLDER=src/main/core

RUN mkdir ${GLPI_CONFIG_DIR} ${GLPI_OPT_DIR} ${GLPI_FILES_DIR} ${GLPI_LOG_DIR}
Expand Down Expand Up @@ -65,6 +66,7 @@ RUN mkdir ${GLPI_FILES_DIR}/_templates \
# && chmod -R 755 ${GLPI_WWW}/*.php

VOLUME $GLPI_FILES_DIR
VOLUME $GLPI_MARKETPLACE_DIR
VOLUME $GLPI_CONFIG_DIR
VOLUME $GLPI_LOG_DIR

Expand Down
2 changes: 1 addition & 1 deletion src/main/init/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG GLPI_FILES_DIR=/var/lib/glpi
ARG GLPI_LOG_DIR=/var/log/glpi
ARG GLPI_OPT_DIR=/opt/glpi

COPY src/main/init/script/glpi-install.sh ${GLPI_OPT_DIR}/
COPY src/main/init/opt/glpi/* ${GLPI_OPT_DIR}/

RUN chown -R www-data:www-data ${GLPI_OPT_DIR} \
&& chmod 755 ${GLPI_OPT_DIR}/glpi-install.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,29 +90,30 @@ EOF
cat /etc/glpi/local_define.php

note_start_task 0 "generate_local_define()"
cat <<EOF > /etc/glpi/local_define.php
<?php
define('GLPI_FILES_DIR', '/var/lib/glpi');
define('GLPI_VAR_DIR', GLPI_FILES_DIR);
define('GLPI_DOC_DIR', GLPI_FILES_DIR);
define('GLPI_CACHE_DIR', GLPI_FILES_DIR . '/_cache');
define('GLPI_CRON_DIR', GLPI_FILES_DIR . '/_cron');
define('GLPI_DUMP_DIR', GLPI_FILES_DIR . '/_dumps');
define('GLPI_GRAPH_DIR', GLPI_FILES_DIR . '/_graphs');
define('GLPI_LOCAL_I18N_DIR', GLPI_FILES_DIR . '/_locales');
define('GLPI_LOCK_DIR', GLPI_FILES_DIR . '/_lock');
define('GLPI_PICTURE_DIR', GLPI_FILES_DIR . '/_pictures');
define('GLPI_PLUGIN_DOC_DIR', GLPI_FILES_DIR . '/_plugins');
define('GLPI_RSS_DIR', GLPI_FILES_DIR . '/_rss');
define('GLPI_SESSION_DIR', GLPI_FILES_DIR . '/_sessions');
define('GLPI_TMP_DIR', GLPI_FILES_DIR . '/_tmp');
define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
define('GLPI_INVENTORY_DIR', GLPI_FILES_DIR . '/_inventories');
define('GLPI_MARKETPLACE_DIR', GLPI_FILES_DIR . '/marketplace');
cp /opt/glpi/local_define.php /etc/glpi/local_define.php
# cat <<EOF > /etc/glpi/local_define.php
# <?php
# define('GLPI_FILES_DIR', '/var/lib/glpi');
# define('GLPI_VAR_DIR', GLPI_FILES_DIR);
# define('GLPI_DOC_DIR', GLPI_FILES_DIR);
# define('GLPI_CACHE_DIR', GLPI_FILES_DIR . '/_cache');
# define('GLPI_CRON_DIR', GLPI_FILES_DIR . '/_cron');
# define('GLPI_DUMP_DIR', GLPI_FILES_DIR . '/_dumps');
# define('GLPI_GRAPH_DIR', GLPI_FILES_DIR . '/_graphs');
# define('GLPI_LOCAL_I18N_DIR', GLPI_FILES_DIR . '/_locales');
# define('GLPI_LOCK_DIR', GLPI_FILES_DIR . '/_lock');
# define('GLPI_PICTURE_DIR', GLPI_FILES_DIR . '/_pictures');
# define('GLPI_PLUGIN_DOC_DIR', GLPI_FILES_DIR . '/_plugins');
# define('GLPI_RSS_DIR', GLPI_FILES_DIR . '/_rss');
# define('GLPI_SESSION_DIR', GLPI_FILES_DIR . '/_sessions');
# define('GLPI_TMP_DIR', GLPI_FILES_DIR . '/_tmp');
# define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
# define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
# define('GLPI_INVENTORY_DIR', GLPI_FILES_DIR . '/_inventories');
# define('GLPI_MARKETPLACE_DIR', GLPI_FILES_DIR . '/marketplace');

define('GLPI_LOG_DIR', '/var/log/glpi');
EOF
# define('GLPI_LOG_DIR', '/var/log/glpi');
# EOF
succeeded 0 "generate_local_define()"
note 0 "print local_define()"
cat /etc/glpi/local_define.php
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php
// WARNING:
// This file won't be applied to the container. Changes made to this
// file must be done by modifying the glpi-install.sh script.
// NOTE:
// This file is to be copied into /etc/glpi/local_define.php
define('GLPI_FILES_DIR', '/var/lib/glpi');
define('GLPI_VAR_DIR', GLPI_FILES_DIR);
define('GLPI_DOC_DIR', GLPI_FILES_DIR);
Expand All @@ -17,9 +16,8 @@
define('GLPI_SESSION_DIR', GLPI_FILES_DIR . '/_sessions');
define('GLPI_TMP_DIR', GLPI_FILES_DIR . '/_tmp');
define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
define('GLPI_UPLOAD_DIR', GLPI_FILES_DIR . '/_uploads');
define('GLPI_INVENTORY_DIR', GLPI_FILES_DIR . '/_inventories');
define('GLPI_MARKETPLACE_DIR', GLPI_FILES_DIR . '/marketplace');
// define('GLPI_MARKETPLACE_DIR', GLPI_FILES_DIR . '/marketplace');

define('GLPI_LOG_DIR', '/var/log/glpi');

Expand Down

0 comments on commit d3f000e

Please sign in to comment.