diff --git a/build/foundry/src/entrypoint.sh b/build/foundry/src/entrypoint.sh index d4ae62f..bf62fb6 100755 --- a/build/foundry/src/entrypoint.sh +++ b/build/foundry/src/entrypoint.sh @@ -1,5 +1,14 @@ #!/bin/sh +_sig_term() { + echo "Chaught SIGTERM signal!" + kill -TERM "$node_pid" 2>/dev/null +} + + + +trap _sig_term TERM + optionsPath=/home/foundry/data/Config/options.json if [ -f "${optionsPath}" ]; then @@ -13,6 +22,9 @@ echo "${optionsPath} not found the settings will be applied on next restart" fi -node "$@" +node "$@" & +node_pid=$! + +wait $node_pid exit 0 \ No newline at end of file