Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifications to allow overriding paths #51

Open
wants to merge 1 commit into
base: 4.2
Choose a base branch
from
Open
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: 10 additions & 4 deletions scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ DEFAULT_CRONTAB_FREQUENCY_ESCAPED=$(printf '%s\n' "${DEFAULT_CRONTAB_FREQUENCY}"
[ -z "$CRONTAB_FREQUENCY" ] && CRONTAB_FREQUENCY="$DEFAULT_CRONTAB_FREQUENCY"
CRONTAB_FREQUENCY_ESCAPED=$(printf '%s\n' "${CRONTAB_FREQUENCY}" | sed 's/[[\.*^$/]/\\&/g')

SATIS_REPO=${SATIS_REPO:=/app/config.json}
SATIS_CONFIG=${SATIS_CONFIG:=/app/config.php}
SATIS_ID_RSA=${SATIS_ID_RSA:=/var/tmp/id}

cp $SATIS_REPO /app/config.json

echo ""
cat /app/config.json
echo ""
Expand Down Expand Up @@ -44,8 +50,9 @@ for _DOMAIN in $PRIVATE_REPO_DOMAIN_LIST ; do
fi
done

echo " >> Copying host ssh key from /var/tmp/id to /root/.ssh/id_rsa"
cp /var/tmp/id /root/.ssh/id_rsa
echo " >> Copying host ssh key from $SATIS_ID_RSA to /root/.ssh/id_rsa"
cp $SATIS_ID_RSA /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa

echo " >> Building Satis for the first time"
scripts/build.sh
Expand All @@ -58,7 +65,6 @@ else
fi

# Copy custom config if exists
[[ -f /app/config.php ]] && cp /app/config.php /satisfy/app/config.php

[ ! -z "$SATIS_CONFIG" ] && cp $SATIS_CONFIG /satisfy/app/config.php

exit 0