-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88f5457
commit e98444c
Showing
2 changed files
with
16 additions
and
15 deletions.
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 |
---|---|---|
|
@@ -18,12 +18,17 @@ chown apache /home/files | |
chgrp apache /home/files | ||
|
||
declare -A configVariable | ||
if ! test -f /home/config.inc.php; then | ||
if [ -f $SAVED_OJS_CONF ] | ||
then | ||
echo "Using existing config.inc.php from /home/config.inc.php" | ||
cp $SAVED_OJS_CONF $OJS_CONF | ||
else | ||
# Set config variables using env variables https://github.com/pkp/ojs/blob/main/config.TEMPLATE.inc.php | ||
echo "Updating OJS config based on env variables..." | ||
echo "No existing config in /home. Updating OJS config based on env variables..." | ||
# General | ||
configVariable["installed"]="On" | ||
configVariable["base_url"]=$WEBSITE_HOSTNAME | ||
# configVariable["base_url"]=$WEBSITE_HOSTNAME | ||
configVariable["base_url"]="https://submissions.post45.org" | ||
configVariable["time_zone"]=$TIME_ZONE | ||
configVariable["restful_urls"]="On" | ||
# Database | ||
|
@@ -49,13 +54,11 @@ if ! test -f /home/config.inc.php; then | |
configVariable["default_envelope_sender"]="[email protected]" | ||
# OAI | ||
configVariable["oai"]="Off" | ||
for key in "${!configVariable[@]}"; do | ||
ojs-variable $key ${configVariable[$key]} | ||
done | ||
cp $OJS_CONF $SAVED_OJS_CONF | ||
fi | ||
|
||
for key in "${!configVariable[@]}"; do | ||
ojs-variable $key ${configVariable[$key]} | ||
done | ||
|
||
chmod +x /usr/local/bin/ojs-start | ||
ojs-start | ||
# Note: Fresh installs are async, so /home/config.inc.php may not be correct | ||
cp config.inc.php /home/config.inc.php | ||
ojs-start |