Files
runner/src/Misc/layoutbin/runsvc.sh
T

22 lines
576 B
Bash
Raw Normal View History

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
nodever=${GITHUB_ACTIONS_RUNNER_FORCED_NODE_VERSION:-node16}
2019-10-10 00:52:42 -04: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
./externals/$nodever/bin/node ./bin/RunnerService.js &
2019-10-10 00:52:42 -04:00
PID=$!
wait $PID
trap - TERM INT
wait $PID