Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
nodes
typescript
duniter
Commits
5311dd56
Commit
5311dd56
authored
2 years ago
by
pini
Browse files
Options
Downloads
Plain Diff
Merge branch 'pini-docker-sigterm' into 'dev'
fix: gracefully exit on sigterm See merge request
!1410
parents
6b33b8ab
677b8163
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1410
fix: gracefully exit on sigterm
Pipeline
#19136
passed
2 years ago
Stage: tests
Stage: package
Stage: quality
Stage: integration
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
release/docker/docker-entrypoint.sh
+1
-1
1 addition, 1 deletion
release/docker/docker-entrypoint.sh
release/docker/duniter.sh
+14
-1
14 additions, 1 deletion
release/docker/duniter.sh
with
15 additions
and
2 deletions
release/docker/docker-entrypoint.sh
+
1
−
1
View file @
5311dd56
#!/bin/sh
set
-uo
pipefail
function
boolean
()
{
boolean
()
{
echo
"
$1
"
|
sed
-E
's/^(true|yes|1)$/true/i'
}
big_fat_warning
=
'\033[01;31m**WARNING**:\033[0m'
...
...
This diff is collapsed.
Click to expand it.
release/docker/duniter.sh
+
14
−
1
View file @
5311dd56
#!/bin/sh
# Terminate gracefully on SIGTERM by propagating it to the 'node' process
sigterm
()
{
echo
"Received SIGTERM. Terminating..."
>
&2
pkill node
wait
%1
}
trap
'sigterm'
TERM
# Main
cd
/duniter
if
[
"
$1
"
!=
--home
]
;
then
set
--
--home
/var/lib/duniter
"
$@
"
fi
exec
bin/duniter
"
$@
"
# Launch in background and wait
# This way we can catch SIGTERM
bin/duniter
"
$@
"
&
wait
%1
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