Possibility to use install.php

With this change it's possible to not remove install.php on container startup.
This is usefull if there is no DB.
This commit is contained in:
dor_pauli 2023-03-23 19:06:48 +01:00
parent bc73931477
commit a97fb808dc
No known key found for this signature in database
GPG Key ID: B2F6B1E15963F107
3 changed files with 5 additions and 2 deletions

View File

@ -46,7 +46,7 @@ ENV APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data \
OCS_LOG_DIR=/var/log/ocsinventory-server OCS_VARLIB_DIR=/var/lib/ocsinventory-reports/ OCS_WEBCONSOLE_DIR=/usr/share/ocsinventory-reports \
OCS_PERLEXT_DIR=/etc/ocsinventory-server/perl/ OCS_PLUGINSEXT_DIR=/etc/ocsinventory-server/plugins/ \
OCS_SSL_ENABLED=0 OCS_SSL_WEB_MODE=DISABLED OCS_SSL_COM_MODE=DISABLED OCS_SSL_KEY=/path/to/key OCS_SSL_CERT=/path/to/cert OCS_SSL_CA=/path/to/ca \
TZ=Europe/Paris
OCS_INSTALL_ENABLED=0 TZ=Europe/Paris
ENV OCS_VERSION 2.11.1

View File

@ -19,6 +19,9 @@ services:
OCS_DB_NAME: ocsweb
# See documentation to set up SSL for MySQL
OCS_SSL_ENABLED: 0
# Enable with 1 to be able to use install.php, if
# you do not already have a DB
OCS_INSTALL_ENABLED: 0
links:
- ocsdb
networks:

View File

@ -49,7 +49,7 @@ chown -R $APACHE_RUN_USER: $OCS_VARLIB_DIR
chown -R $APACHE_RUN_USER: $OCS_WEBCONSOLE_DIR
# rm install.php
if [ -f $OCS_WEBCONSOLE_DIR/ocsreports/install.php ]; then
if [ -f $OCS_WEBCONSOLE_DIR/ocsreports/install.php ] && [ $OCS_INSTALL_ENABLED -eq "0" ]; then
rm $OCS_WEBCONSOLE_DIR/ocsreports/install.php
fi