Skip to content

Commit 53a42c0

Browse files
committed
Check if database.php is present even if Redcap is already installed
1 parent 23cba36 commit 53a42c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

charts/redcap/configuration/redcap/init/redcap-install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ update_database_config () {
5858

5959
echo "[INFO] Injecting REDCap database configuration"
6060
cp -f /tmp/conf/database.php "${REDCAP_INSTALL_PATH}/database.php"
61-
6261
echo "[INFO] REDCap Database configuration updated!"
6362
}
6463

@@ -80,6 +79,11 @@ if [ -n "$(find "$REDCAP_INSTALL_PATH" -mindepth 1 -maxdepth 1 -not -path "$RED
8079

8180
if [ "$REDCAP_VERSION_SANITIZED" -eq "$REDCAP_CURRENT_VERSION_SANITIZED" ]; then
8281
echo "[INFO] REDCap version ${REDCAP_VERSION} files are already present in ${REDCAP_INSTALL_PATH}. Skipping installation process."
82+
if [ -f "${APP_INSTALL_PATH}/database.php" ]; then
83+
echo "database.php founded"
84+
else
85+
update_database_config
86+
fi
8387
exit 0
8488

8589
elif [ "$REDCAP_VERSION_SANITIZED" -gt "$REDCAP_CURRENT_VERSION_SANITIZED" ]; then

0 commit comments

Comments
 (0)