Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chenhao Ma
core
Commits
78593fb2
Commit
78593fb2
authored
9 years ago
by
Gunnar Schaefer
Browse files
Options
Downloads
Patches
Plain Diff
Don't bootstrap users unconditionally
parent
acbd780f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run.sh
+13
-9
13 additions, 9 deletions
run.sh
with
13 additions
and
9 deletions
run.sh
+
13
−
9
View file @
78593fb2
...
...
@@ -16,10 +16,6 @@ if [ "$#" -gt 2 ]; then
exit
1
fi
if
!
[
-f
"bootstrap.json"
]
;
then
echo
"Please create bootstrap.json from bootstrap.json.sample"
exit
1
fi
if
[
-f
"
`
which brew
`
"
]
;
then
echo
"Homebrew is installed"
...
...
@@ -69,11 +65,17 @@ else
echo
"MongoDB installed"
fi
if
[
-d
"
$PERSITENT_DIR
/db"
]
;
then
echo
"Persistence store exists at
$PERSITENT_DIR
/db"
if
[
-f
"
$PERSITENT_DIR
/db/mongod.lock"
]
;
then
echo
"Database exists at
$PERSITENT_DIR
/db. Not bootstrapping users."
BOOTSTRAP_USERS
=
0
else
echo
"Creating
persistence store exists
at
$PERSITENT_DIR
/db"
echo
"Creating
database location
at
$PERSITENT_DIR
/db"
mkdir
-p
$PERSITENT_DIR
/db
if
!
[
-f
"bootstrap.json"
]
;
then
echo
"Cannot bootstrap users. Please create bootstrap.json from bootstrap.json.sample."
exit
1
fi
BOOTSTRAP_USERS
=
1
fi
...
...
@@ -95,10 +97,12 @@ export PYTHONPATH=.
bin/bootstrap.py configure mongodb://localhost/scitran
local
Local https://localhost:8080/api oauth_client_id
# Boostrap users
bin/bootstrap.py
users
mongodb://localhost/scitran bootstrap.json
if
[
"
$BOOTSTRAP_USERS
"
-eq
"1"
]
;
then
bin/bootstrap.py
users
mongodb://localhost/scitran bootstrap.json
fi
if
[
-d
"
$PERSITENT_DIR
/data"
]
;
then
echo
"
The
$PERSITENT_DIR
/data directory is present, skipping data
bootstrapping
.
Remove to re-bootstrap."
echo
"
Persistence store exists at
$PERSITENT_DIR
/data. Not
bootstrapping
data.
Remove to re-bootstrap."
else
echo
"Downloading testdata"
curl https://codeload.github.com/scitran/testdata/tar.gz/master |
tar
xz
-C
$PERSITENT_DIR
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment