Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

execute shell command when container is being stopped

...

#Trap SIGTERM
trap 'true' SIGTERM

#Execute command
"${@}" &

#Wait
wait $!

#Cleanup
cleanup
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #execute #shell #command #container #stopped
ADD COMMENT
Topic
Name
5+5 =