do not display confusing error message if logs do not exist

it is expected but the user does not know that and will incorrectly
think it is an error
This commit is contained in:
Earl Warren 2024-02-08 10:55:50 +01:00
parent 9511dbeb90
commit 82ae462c78
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -84,7 +84,7 @@ function myip() {
function start_forgejo() { function start_forgejo() {
local work_path=$DIR/forgejo-work-path 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/forgejo --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 -- $DIR/forgejo --config $work_path/app.ini --work-path $work_path
if ! retry grep 'Starting server on' $work_path/log/forgejo.log ; then if ! retry grep --no-messages --quiet 'Starting server on' $work_path/log/forgejo.log ; then
cat $DIR/*.log cat $DIR/*.log
cat $work_path/log/*.log cat $work_path/log/*.log
return 1 return 1