mirror of
https://gitlab.com/Snogard/kaido.git
synced 2025-08-20 10:50:06 +02:00
catching sigterm for foundry
This commit is contained in:
parent
d3ce154d25
commit
25bbaf8c35
@ -1,5 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/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
|
optionsPath=/home/foundry/data/Config/options.json
|
||||||
|
|
||||||
if [ -f "${optionsPath}" ]; then
|
if [ -f "${optionsPath}" ]; then
|
||||||
@ -13,6 +22,9 @@ echo "${optionsPath} not found the settings will be applied on next restart"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
node "$@"
|
node "$@" &
|
||||||
|
node_pid=$!
|
||||||
|
|
||||||
|
wait $node_pid
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
x
Reference in New Issue
Block a user