Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docker-openldap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
et-public
docker-openldap
Commits
ee85124b
Commit
ee85124b
authored
3 years ago
by
Xueshan Feng
Browse files
Options
Downloads
Patches
Plain Diff
Modify start.sh to use /force-reload to indicate if we should force reload data.
parent
3c609862
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
start.sh
+8
-4
8 additions, 4 deletions
start.sh
with
8 additions
and
4 deletions
start.sh
+
8
−
4
View file @
ee85124b
...
@@ -27,6 +27,13 @@ function cn_config() {
...
@@ -27,6 +27,13 @@ function cn_config() {
}
}
function
mdb_load
()
{
function
mdb_load
()
{
if
[
-f
${
LDAP_BAK_DIR
}
/force-reload
]
;
then
echo
"
${
LDAP_BAK_DIR
}
/force-reload present, set LDAP_FORCE_RESTORE=true"
LDAP_FORCE_RESTORE
=
"true"
else
LDAP_FORCE_RESTORE
=
"false"
fi
echo
-e
"Assessing data state for ldap role:
${
LDAP_ROLE
}
"
echo
-e
"Assessing data state for ldap role:
${
LDAP_ROLE
}
"
file_data
=
$(
ls
-t
${
LDAP_BAK_DIR
}
/mdb/data.mdb
*
2>/dev/null |
head
-n
1
)
file_data
=
$(
ls
-t
${
LDAP_BAK_DIR
}
/mdb/data.mdb
*
2>/dev/null |
head
-n
1
)
...
@@ -213,14 +220,11 @@ function kinit_svc() {
...
@@ -213,14 +220,11 @@ function kinit_svc() {
}
}
# MAIN
# MAIN
if
[
-e
/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4
]
then
export
LD_PRELOAD
=
"/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4"
fi
# ensure data dump dirs present
# ensure data dump dirs present
mkdir
-p
${
LDAP_BAK_DIR
}
/mdb
${
LDAP_BAK_DIR
}
/mdb/accesslog
${
LDAP_BAK_DIR
}
/config
${
LDAP_MDB_DIR
}
/accesslog
mkdir
-p
${
LDAP_BAK_DIR
}
/mdb
${
LDAP_BAK_DIR
}
/mdb/accesslog
${
LDAP_BAK_DIR
}
/config
${
LDAP_MDB_DIR
}
/accesslog
# set LDAP_FORCE_RESTORE to true if
case
"
${
ACTION
}
"
in
case
"
${
ACTION
}
"
in
dump
)
dump
)
# Only do snaphost on one ldap server
# Only do snaphost on one ldap server
...
...
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