Permalink
Browse files

minor script cleanup

  • Loading branch information...
marius311 committed Aug 2, 2018
1 parent 92f7d92 commit af3e59e28795b1dfa2f72a295dce6ba6c876b99a
Showing with 6 additions and 3 deletions.
  1. +2 −1 images/makeproject/Dockerfile
  2. +4 −2 images/makeproject/makeproject-step2.sh
@@ -86,7 +86,8 @@ FROM base$TAG AS makeproject
# everything which depends on build-args is done as ONBUILD in this stage, so
# the user can customize it
ONBUILD ARG TAG
ARG TAG
ENV TAG=$TAG
ONBUILD ARG BOINC_USER
ONBUILD ARG PROJECT_ROOT
ONBUILD ENV BOINC_USER=$BOINC_USER \
@@ -5,12 +5,14 @@ set -e
source /run/secrets/secrets.env
PROJECT_ROOT_DEST=$PROJECT_ROOT.dst
cd $PROJECT_ROOT
echo "Updating project files in data volume..."
cd $PROJECT_ROOT
# do variable substitution in files
for file in config.xml html/user/schedulers.txt *.httpd.conf html/project/project.inc; do
sed -i -e "s|\${PROJECT}|$PROJECT|gI" \
-e "s|REPLACE WITH PROJECT NAME|$PROJECT|gI" \
-e "s|\${PROJECT_ROOT}|$PROJECT_ROOT|gI" \
-e "s|\${URL_BASE}|$URL_BASE|gI" \
-e "s|\${DB_PASSWD}|$DB_PASSWD|gI" \
@@ -44,7 +46,7 @@ fi
# if we can get in the root MySQL account without password, it means this is the
# first run after project creation, in which case set the password, and create
# the project database
if mysql -u root -e ""; then
if mysql -u root -e "" &> /dev/null ; then
echo "Creating database..."
mysqladmin -h mysql -u root password $DB_PASSWD
PYTHONPATH=/usr/local/boinc/py python -c """if 1:

0 comments on commit af3e59e

Please sign in to comment.