mirror of
https://code.forgejo.org/actions/setup-forgejo.git
synced 2024-12-26 06:42:17 -05:00
daemonize forgejo-runner
This commit is contained in:
parent
03450c69a0
commit
202709a555
1 changed files with 4 additions and 5 deletions
|
@ -10,8 +10,8 @@ function dependencies() {
|
|||
tar zxf go1.20.2.linux-amd64.tar.gz
|
||||
export PATH=$PATH:$(pwd)/go/bin
|
||||
fi
|
||||
if ! which make > /dev/null ; then
|
||||
apt-get install -y -qq make
|
||||
if ! which make daemon > /dev/null ; then
|
||||
apt-get install -y -qq make daemon
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,7 @@ function register() {
|
|||
}
|
||||
|
||||
function run() {
|
||||
./forgejo-runner/forgejo-runner daemon >& forgejo-runner.log &
|
||||
echo $! > forgejo-runner-pid
|
||||
daemon --chdir=$(pwd) --unsafe --pidfile=$(pwd)/forgejo-runner-pid --errlog=$(pwd)/forgejo-runner.log --output=$(pwd)/forgejo-runner.log ./forgejo-runner/forgejo-runner daemon
|
||||
sleep 1
|
||||
cat forgejo-runner.log
|
||||
}
|
||||
|
@ -59,7 +58,7 @@ function setup() {
|
|||
|
||||
function teardown() {
|
||||
if test -f forgejo-runner-pid ; then
|
||||
kill -9 $(cat forgejo-runner-pid)
|
||||
kill -TERM $(cat forgejo-runner-pid)
|
||||
rm -f forgejo-runner-pid
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue