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

Commit

Permalink
fix(install): update libinstall scripts for Centreon (#8180)
Browse files Browse the repository at this point in the history
hi, thanks for you contribution.
  • Loading branch information
alk-jbrochet authored and loiclau committed Dec 30, 2019
1 parent c1f6467 commit 4f1a5af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
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

0 comments on commit 4f1a5af

Please sign in to comment.