Merge pull request #177573 from asbachb/bugfix/gitea/175967
This commit is contained in:
commit
b5b9c81496
|
@ -506,24 +506,24 @@ in
|
||||||
function gitea_setup {
|
function gitea_setup {
|
||||||
cp -f ${configFile} ${runConfig}
|
cp -f ${configFile} ${runConfig}
|
||||||
|
|
||||||
if [ ! -e ${secretKey} ]; then
|
if [ ! -s ${secretKey} ]; then
|
||||||
${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey}
|
${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Migrate LFS_JWT_SECRET filename
|
# Migrate LFS_JWT_SECRET filename
|
||||||
if [[ -e ${oldLfsJwtSecret} && ! -e ${lfsJwtSecret} ]]; then
|
if [[ -s ${oldLfsJwtSecret} && ! -s ${lfsJwtSecret} ]]; then
|
||||||
mv ${oldLfsJwtSecret} ${lfsJwtSecret}
|
mv ${oldLfsJwtSecret} ${lfsJwtSecret}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e ${oauth2JwtSecret} ]; then
|
if [ ! -s ${oauth2JwtSecret} ]; then
|
||||||
${gitea}/bin/gitea generate secret JWT_SECRET > ${oauth2JwtSecret}
|
${gitea}/bin/gitea generate secret JWT_SECRET > ${oauth2JwtSecret}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e ${lfsJwtSecret} ]; then
|
if [ ! -s ${lfsJwtSecret} ]; then
|
||||||
${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${lfsJwtSecret}
|
${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${lfsJwtSecret}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e ${internalToken} ]; then
|
if [ ! -s ${internalToken} ]; then
|
||||||
${gitea}/bin/gitea generate secret INTERNAL_TOKEN > ${internalToken}
|
${gitea}/bin/gitea generate secret INTERNAL_TOKEN > ${internalToken}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue