onedev/server-product/docker/entrypoint-agent.sh
OneDev 5d67e72d9d Some improvements and bug fixes for arm64 support
1. Use 18.04 instead of 22.04 as JSW has issues running on 22.04 currently
2. Push to test tag if build.sh runs without release param
3. Improve agent entrypoint to make it able to respond to ctrl-c when running in console mode
2023-01-26 09:29:26 +00:00

27 lines
324 B
Bash
Executable File

#!/bin/bash
set -e
_sigterm() {
kill -TERM "$child"
wait "$child"
exit 1
}
trap _sigterm SIGTERM
trap _sigterm SIGINT
UNAME=`uname -m`
if [[ $UNAME == "aarch64" ]]; then
CPUARCH="arm-64"
else
CPUARCH="x86-64"
fi
cd /agent/boot
./wrapper-linux-$CPUARCH /agent/conf/wrapper.conf &
child=$!
wait "$child"