2019-10-10 00:52:42 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# convert SIGTERM signal to SIGINT
|
|
|
|
|
# for more info on how to propagate SIGTERM to a child process see: http://veithen.github.io/2014/11/16/sigterm-propagation.html
|
|
|
|
|
trap 'kill -INT $PID' TERM INT
|
|
|
|
|
|
|
|
|
|
if [ -f ".path" ]; then
|
|
|
|
|
# configure
|
|
|
|
|
export PATH=`cat .path`
|
|
|
|
|
echo ".path=${PATH}"
|
|
|
|
|
fi
|
|
|
|
|
|
2023-10-10 17:10:43 +02:00
|
|
|
nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node16}
|
2019-10-10 00:52:42 -04:00
|
|
|
|
2022-02-14 15:06:08 +01:00
|
|
|
# insert anything to setup env when running as a service
|
2019-10-10 00:52:42 -04:00
|
|
|
# run the host process which keep the listener alive
|
2022-02-14 15:06:08 +01:00
|
|
|
./externals/$nodever/bin/node ./bin/RunnerService.js &
|
2019-10-10 00:52:42 -04:00
|
|
|
PID=$!
|
|
|
|
|
wait $PID
|
|
|
|
|
trap - TERM INT
|
|
|
|
|
wait $PID
|