Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
seafile-sync
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
Service Desk
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
Janne Mareike Koschinski
seafile-sync
Commits
caa01683
Verified
Commit
caa01683
authored
5 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fix bash script
parent
18027a34
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker-entrypoint.sh
+9
-1
9 additions, 1 deletion
docker-entrypoint.sh
with
9 additions
and
1 deletion
docker-entrypoint.sh
+
9
−
1
View file @
caa01683
#!/usr/bin/env bash
set
-Eeo
pipefail
trap
"exit"
INT
mkdir
/seafile-data
seaf-cli init
-d
/seafile-data
seaf-cli start
sleep
5
if
[
-z
"
$OTP_TOKEN
"
]
;
then
echo
"syncing library"
seaf-cli
sync
-l
"
$LIBRARY
"
-s
"
$SERVER
"
-d
"/sync"
-u
"
$EMAIL
"
-p
"
$PASSWORD
"
else
echo
"syncing library with OTP"
seaf-cli
sync
-l
"
$LIBRARY
"
-s
"
$SERVER
"
-d
"/sync"
-u
"
$EMAIL
"
-p
"
$PASSWORD
"
--tfa
$(
oathtool
--totp
-b
"
$OTP_TOKEN
"
)
fi
seaf-cli start
maxretry
=
4
retry
=
0
...
...
@@ -17,6 +24,7 @@ while [ "$retry" -le "$maxretry" ]; do
ps aux |
grep
seafile |
grep
-v
grep
>
/dev/null 2> /dev/null
||
{
retry
=
$(
expr
$retry
+ 1
)
;
}
seaf-cli status
sleep
5
done
echo
"Seafile not running"
...
...
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