Add jwt secret because gitea edit config if not present

This commit is contained in:
Josué Tille
2023-12-13 10:38:10 +01:00
parent 676d283d14
commit b7b73bbf89
3 changed files with 13 additions and 3 deletions

View File

@ -81,6 +81,11 @@ if [[ -z "${lfs_jwt_secret:-}" ]]; then
ynh_app_setting_set --app "$app" --key lfs_jwt_secret --value="$lfs_jwt_secret"
fi
if [[ -z "${jwt_secret:-}" ]]; then
jwt_secret=$(ynh_exec_as "$app" "$install_dir/gitea" generate secret JWT_SECRET)
ynh_app_setting_set --app "$app" --key jwt_secret --value="$jwt_secret"
fi
#=================================================
# UPDATE A CONFIG FILE
#=================================================