-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for customizable session storage in Magento environment
- Loading branch information
1 parent
b19e149
commit c8c436c
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# check if MAGENTO_ENV_SESSION is set and it is different from the default value | ||
if [ -z "$MAGENTO_ENV_SESSION" ] || [ "$MAGENTO_ENV_SESSION" = "['save' => 'files']" ]; then | ||
echo "MAGENTO_ENV_SESSION is not set or is set use the default value, skipping..." | ||
exit 0 | ||
fi | ||
|
||
cd /bitnami/magento/app/etc || exit 0 | ||
|
||
file="env.php" | ||
sed -i.bak "/'session' => \[/,/\],/c\ | ||
'session' => $MAGENTO_ENV_SESSION \ | ||
," "$file" | ||
|
||
echo "Updated /bitnami/magento/app/etc/$file with MAGENTO_ENV_SESSION. Backup saved as /bitnami/magento/app/etc/$file.bak" |