Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(install): update libinstall scripts for Centreon 19.10.x #8180

Merged
merged 1 commit into from
Dec 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions libinstall/CentWeb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,14 @@ check_result $? "$(gettext "Change right on") $CENTREON_ETC"
log "INFO" "$(gettext "Copy CentWeb and GPL_LIB in temporary final directory")"
cp -Rf $TMP_DIR/src/www $TMP_DIR/final
cp -Rf $TMP_DIR/src/GPL_LIB $TMP_DIR/final
mkdir -p $TMP_DIR/final/config
cp -Rf $TMP_DIR/src/config/partition.d $TMP_DIR/final/config/partition.d
cp -Rf $TMP_DIR/src/config $TMP_DIR/final
mv $TMP_DIR/src/config/centreon.config.php.template $TMP_DIR/src/config/centreon.config.php
cp -f $TMP_DIR/src/container.php $TMP_DIR/final
cp -f $TMP_DIR/src/bootstrap.php $TMP_DIR/final
cp -f $TMP_DIR/src/composer.json $TMP_DIR/final
cp -f $TMP_DIR/src/package.json $TMP_DIR/final
cp -f $TMP_DIR/src/package-lock.json $TMP_DIR/final
cp -f $TMP_DIR/src/.env $TMP_DIR/final
cp -Rf $TMP_DIR/src/src $TMP_DIR/final

## Prepare and copy composer module
Expand Down Expand Up @@ -383,6 +384,12 @@ check_result $? "$(gettext "Change right for install directory")"
cp -f $TMP_DIR/final/bootstrap.php $INSTALL_DIR_CENTREON/bootstrap.php >> "$LOG_FILE" 2>&1
$CHOWN $WEB_USER:$WEB_GROUP $INSTALL_DIR_CENTREON/bootstrap.php

cp -f $TMP_DIR/final/.env $INSTALL_DIR_CENTREON/.env >> "$LOG_FILE" 2>&1
$CHOWN $WEB_USER:$WEB_GROUP $INSTALL_DIR_CENTREON/.env

cp -f $TMP_DIR/final/container.php $INSTALL_DIR_CENTREON/container.php >> "$LOG_FILE" 2>&1
$CHOWN $WEB_USER:$WEB_GROUP $INSTALL_DIR_CENTREON/container.php

cp -Rf $TMP_DIR/final/vendor $INSTALL_DIR_CENTREON/ >> "$LOG_FILE" 2>&1
$CHOWN -R $WEB_USER:$WEB_GROUP $INSTALL_DIR_CENTREON/vendor

Expand Down Expand Up @@ -413,6 +420,9 @@ $INSTALL_DIR/cinstall $cinstall_opts \
$INSTALL_DIR/cinstall $cinstall_opts \
-u "$CENTREON_USER" -g "$CENTREON_GROUP" -d 775 \
$CENTREON_CACHEDIR/config/export >> "$LOG_FILE" 2>&1
$INSTALL_DIR/cinstall $cinstall_opts \
-u "$CENTREON_USER" -g "$CENTREON_GROUP" -d 775 \
$CENTREON_CACHEDIR/symfony >> "$LOG_FILE" 2>&1

log "INFO" "$(gettext "Copying GPL_LIB")"
$INSTALL_DIR/cinstall $cinstall_opts \
Expand Down
4 changes: 2 additions & 2 deletions libinstall/functions
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ yes_no_default() {
done
if [ "$res" = "$yes" ] ; then
return 0
else
else
return 1
fi
}
Expand Down Expand Up @@ -2074,7 +2074,7 @@ check_broker_user()
#----
copyInTempFile()
{
local srclistcp="bin cron config logrotate GPL_LIB lang lib snmptrapd src vendor www libinstall bootstrap.php composer.json package.json package-lock.json"
local srclistcp="bin cron config logrotate GPL_LIB lang lib snmptrapd src vendor www libinstall .env bootstrap.php container.php composer.json package.json package-lock.json"
# Prepare centreon Plugins
echo "$(gettext "Preparing Centreon temporary files")"
if [ -d $TMP_DIR ] ; then
Expand Down