Added option for user to give its own init and exit commands.
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
set -x
|
||||
|
||||
term_handler() {
|
||||
$USER_COMMAND_EXIT
|
||||
exit 143; # 128 + 15 -- SIGTERM
|
||||
}
|
||||
|
||||
trap 'kill ${!}; term_handler' SIGTERM
|
||||
|
||||
$USER_COMMAND_INIT &
|
||||
|
||||
tail -f /dev/null & wait ${!}
|
||||
|
||||
Reference in New Issue
Block a user