Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eclipse-che-sidecar-s3fs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Administrator
eclipse-che-sidecar-s3fs
Commits
97bfde0d
Commit
97bfde0d
authored
4 years ago
by
Administrator
Browse files
Options
Downloads
Patches
Plain Diff
Update empty.sh, trap.sh files
parent
163afef9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#401
passed with stage
in 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
empty.sh
+6
-0
6 additions, 0 deletions
empty.sh
trap.sh
+15
-0
15 additions, 0 deletions
trap.sh
with
21 additions
and
0 deletions
empty.sh
0 → 100644
+
6
−
0
View file @
97bfde0d
#! /usr/bin/env sh
DEST
=
${
AWS_S3_MOUNT
:-
/opt/s3fs/bucket
}
.
trap.sh
tail
-f
/dev/null
This diff is collapsed.
Click to expand it.
trap.sh
0 → 100644
+
15
−
0
View file @
97bfde0d
exit_script
()
{
SIGNAL
=
$1
echo
"Caught
$SIGNAL
! Unmounting
${
DEST
}
..."
fusermount
-uz
${
DEST
}
s3fs
=
$(
ps
-o
pid
=
-o
comm
=
|
grep
s3fs |
sed
-E
's/\s*(\d+)\s+.*/\1/g'
)
if
[
-n
"
$s3fs
"
]
;
then
echo
"Forwarding
$SIGNAL
to
$s3fs
"
kill
-
$SIGNAL
$s3fs
fi
trap
-
$SIGNAL
# clear the trap
exit
$?
}
trap
"exit_script INT"
INT
trap
"exit_script TERM"
TERM
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