Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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 GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
077a0281
Commit
077a0281
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Tidying
parent
ef2a5ca0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-pleroma
+9
-8
9 additions, 8 deletions
src/freedombone-app-pleroma
with
9 additions
and
8 deletions
src/freedombone-app-pleroma
+
9
−
8
View file @
077a0281
...
...
@@ -188,6 +188,11 @@ function change_password_pleroma {
#${PROJECT_NAME}-pass -u "$curr_username" -a pleroma -p "$new_user_password"
}
function
pleroma_create_database_failed
{
run_system_query_postgresql
"ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql
"ALTER USER pleroma NOCREATEDB;"
}
function
pleroma_create_database
{
if
[
-f
$IMAGE_PASSWORD_FILE
]
;
then
PLEROMA_ADMIN_PASSWORD
=
"
$(
printf
`
cat
$IMAGE_PASSWORD_FILE
`
)
"
...
...
@@ -215,8 +220,7 @@ function pleroma_create_database {
if
[
${#
PLEROMA_SECRET_KEY
}
-lt
64
]
;
then
PLEROMA_SECRET_KEY
=
"
$(
create_password 30
)$(
create_password 30
)$(
create_password 30
)
"
if
[
${#
PLEROMA_SECRET_KEY
}
-lt
64
]
;
then
run_system_query_postgresql
"ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql
"ALTER USER pleroma NOCREATEDB;"
pleroma_create_database_failed
echo
$'Pleroma secret key not created'
exit
6782352
fi
...
...
@@ -258,8 +262,7 @@ function pleroma_create_database {
chown
-R
pleroma:pleroma
$PLEROMA_DIR
/
*
sudo
-u
pleroma mix local.rebar
--force
if
[
!
"
$?
"
=
"0"
]
;
then
run_system_query_postgresql
"ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql
"ALTER USER pleroma NOCREATEDB;"
pleroma_create_database_failed
echo
$'mix local.rebar failed'
exit
73528562
fi
...
...
@@ -268,15 +271,13 @@ function pleroma_create_database {
systemctl restart postgresql
sudo
-u
pleroma mix ecto.create
--force
if
[
!
"
$?
"
=
"0"
]
;
then
run_system_query_postgresql
"ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql
"ALTER USER pleroma NOCREATEDB;"
pleroma_create_database_failed
echo
$'mix ecto.create failed'
exit
83653582
fi
sudo
-u
pleroma mix ecto.migrate
--force
if
[
!
"
$?
"
=
"0"
]
;
then
run_system_query_postgresql
"ALTER USER pleroma NOSUPERUSER;"
run_system_query_postgresql
"ALTER USER pleroma NOCREATEDB;"
pleroma_create_database_failed
echo
$'mix ecto.migrate failed'
exit
73752573
fi
...
...
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