Run init and exit commands with eval.

This commit is contained in:
2023-04-10 17:52:19 +08:00
parent 6c50514156
commit 24baf083e8

View File

@@ -2,7 +2,7 @@
set -x
term_handler() {
$USER_COMMAND_EXIT
eval $USER_COMMAND_EXIT
exit 143; # 128 + 15 -- SIGTERM
}
@@ -10,6 +10,6 @@ trap 'kill ${!}; term_handler' SIGTERM
touch $LOG_FILE
$USER_COMMAND_INIT &
eval $USER_COMMAND_INIT &
tail -f $LOG_FILE & wait ${!}