Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
memopol
Commits
30cb22ce
Commit
30cb22ce
authored
Jul 25, 2017
by
Gilles Quenot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sudo for all psql commands
parent
2cb18aae
Pipeline
#1187
passed with stage
in 11 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
bin/quickstart.sh
bin/quickstart.sh
+5
-5
No files found.
bin/quickstart.sh
View file @
30cb22ce
...
...
@@ -42,12 +42,12 @@ pip install -e .[testing]
src/memopol/bin/install_client_deps.sh
# Create pg user and database
if
[
$(
psql
-c
"select 'CNT=' || count(1) from pg_catalog.pg_user where usename='memopol';"
-U
postgres |
grep
CNT
=
1 |
wc
-l
)
-lt
1
]
;
then
psql
-c
"create user memopol with password 'memopol';"
-U
postgres
if
[
$(
sudo
-u
postgres
psql
-c
"select 'CNT=' || count(1) from pg_catalog.pg_user where usename='memopol';"
-U
postgres |
grep
CNT
=
1 |
wc
-l
)
-lt
1
]
;
then
sudo
-u
postgres
psql
-c
"create user memopol with password 'memopol';"
-U
postgres
fi
psql
-c
"alter role memopol with createdb;"
-U
postgres
if
[
$(
psql
-l
-U
postgres | egrep
"^ memopol
\W
"
|
wc
-l
)
-lt
1
]
;
then
psql
-c
"create database memopol with owner memopol;"
-U
postgres
sudo
-u
postgres
psql
-c
"alter role memopol with createdb;"
-U
postgres
if
[
$(
sudo
-u
postgres
psql
-l
-U
postgres | egrep
"^ memopol
\W
"
|
wc
-l
)
-lt
1
]
;
then
sudo
-u
postgres
psql
-c
"create database memopol with owner memopol;"
-U
postgres
fi
# Setup environment
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment