mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-10 20:24:15 -06:00
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
27 lines
324 B
Bash
Executable File
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"
|