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
aa98819f
Commit
aa98819f
authored
8 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Etherpad admin password
parent
e44f30e7
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-etherpad
+8
-21
8 additions, 21 deletions
src/freedombone-app-etherpad
with
8 additions
and
21 deletions
src/freedombone-app-etherpad
+
8
−
21
View file @
aa98819f
...
...
@@ -53,20 +53,7 @@ etherpad_variables=(ETHERPAD_COMMIT
DDNS_PROVIDER
MY_USERNAME
)
function
get_mariadb_etherpad_admin_password
{
if
[
-f
/home/
$MY_USERNAME
/README
]
;
then
if
grep
-q
"MariaDB etherpad admin password"
/home/
$MY_USERNAME
/README
;
then
ETHERPAD_ADMIN_PASSWORD
=
$(
cat
/home/
$MY_USERNAME
/README |
grep
"MariaDB etherpad admin password"
|
awk
-F
':'
'{print $2}'
|
sed
's/^ *//'
)
fi
if
grep
-q
"etherpad administrator password"
/home/
$MY_USERNAME
/README
;
then
ETHERPAD_ADMIN_PASSWORD
=
$(
cat
/home/
$MY_USERNAME
/README |
grep
"etherpad administrator password"
|
awk
-F
':'
'{print $2}'
|
sed
's/^ *//'
)
fi
fi
}
function
etherpad_create_database
{
function_check get_mariadb_etherpad_admin_password
get_mariadb_etherpad_admin_password
if
[
!
$ETHERPAD_ADMIN_PASSWORD
]
;
then
if
[
-f
$IMAGE_PASSWORD_FILE
]
;
then
ETHERPAD_ADMIN_PASSWORD
=
"
$(
printf
`
cat
$IMAGE_PASSWORD_FILE
`
)
"
...
...
@@ -441,6 +428,14 @@ function install_etherpad {
exit
7359
fi
if
[
!
$ETHERPAD_ADMIN_PASSWORD
]
;
then
if
[
-f
$IMAGE_PASSWORD_FILE
]
;
then
ETHERPAD_ADMIN_PASSWORD
=
"
$(
printf
`
cat
$IMAGE_PASSWORD_FILE
`
)
"
else
ETHERPAD_ADMIN_PASSWORD
=
"
$(
create_password
${
MINIMUM_PASSWORD_LENGTH
}
)
"
fi
fi
function_check install_mariadb
install_mariadb
...
...
@@ -481,14 +476,6 @@ function install_etherpad {
function_check add_ddns_domain
add_ddns_domain
$ETHERPAD_DOMAIN_NAME
if
[
!
$ETHERPAD_ADMIN_PASSWORD
]
;
then
if
[
-f
$IMAGE_PASSWORD_FILE
]
;
then
ETHERPAD_ADMIN_PASSWORD
=
"
$(
printf
`
cat
$IMAGE_PASSWORD_FILE
`
)
"
else
ETHERPAD_ADMIN_PASSWORD
=
"
$(
create_password
${
MINIMUM_PASSWORD_LENGTH
}
)
"
fi
fi
create_etherpad_settings
adduser
--system
--home
=
/var/www/
$ETHERPAD_DOMAIN_NAME
/htdocs/
--group
etherpad
...
...
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