upgrades: gitea 1.21.10 -> forgejo 7.0.0
This commit is contained in:
parent
e9bb6f67e6
commit
3bd723d6b8
3 changed files with 56 additions and 2 deletions
11
lib/lib.sh
11
lib/lib.sh
|
|
@ -153,14 +153,21 @@ function start_forgejo() {
|
|||
local version=$1
|
||||
|
||||
download $version
|
||||
start_forgejo_daemon $version $DIR_BINARIES/forgejo-$version
|
||||
}
|
||||
|
||||
function start_forgejo_daemon() {
|
||||
local version=$1
|
||||
local binary=$2
|
||||
|
||||
local work_path=$DIR/forgejo-work-path
|
||||
daemon --chdir=$DIR --unsafe --env="TERM=$TERM" --env="HOME=$HOME" --env="PATH=$PATH" --pidfile=$DIR/forgejo-pid --errlog=$DIR/forgejo-err.log --output=$DIR/forgejo-out.log -- $DIR_BINARIES/forgejo-$version --config $work_path/app.ini --work-path $work_path
|
||||
daemon --chdir=$DIR --unsafe --env="TERM=$TERM" --env="HOME=$HOME" --env="PATH=$PATH" --pidfile=$DIR/forgejo-pid --errlog=$DIR/forgejo-err.log --output=$DIR/forgejo-out.log -- $binary --config $work_path/app.ini --work-path $work_path
|
||||
if ! retry grep --no-messages --quiet 'Starting server on' $work_path/log/forgejo.log ; then
|
||||
grep '' $DIR/*.log
|
||||
grep '' $work_path/log/*.log 2> /dev/null
|
||||
return 1
|
||||
fi
|
||||
echo "$DIR_BINARIES/forgejo-$version --config $work_path/app.ini --work-path $work_path" '"$@"' > $DIR/forgejocli
|
||||
echo "$binary --config $work_path/app.ini --work-path $work_path" '"$@"' > $DIR/forgejocli
|
||||
chmod +x $DIR/forgejocli
|
||||
create_user_and_login $version
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue