From b9d4c6b40fc4f882e4157f627108664271b6d457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 2 Feb 2024 15:23:28 +0100 Subject: [PATCH] Cleanup unused code --- scripts/_common.sh | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index baf9356..84557c4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,26 +25,3 @@ _set_permissions() { chown -R "$app:$app" "/var/log/$app" chmod -R u=rwX,g=rX,o= "/var/log/$app" } - -_gitea_set_secrets() { - if [[ -z "${internal_token:-}" ]]; then - internal_token=$(ynh_exec_as "$app" "$install_dir/gitea" generate secret INTERNAL_TOKEN) - ynh_app_setting_set --app "$app" --key internal_token --value="$internal_token" - fi - - if [[ -z "${secret_key:-}" ]]; then - secret_key=$(ynh_exec_as "$app" "$install_dir/gitea" generate secret SECRET_KEY) - ynh_app_setting_set --app "$app" --key secret_key --value="$secret_key" - fi - - if [[ -n "${lfs_key:-}" ]]; then - lfs_jwt_secret="$lfs_key" - ynh_app_setting_delete --app "$app" --key lfs_key - ynh_app_setting_set --app "$app" --key lfs_jwt_secret --value="$lfs_jwt_secret" - fi - - if [[ -z "${lfs_jwt_secret:-}" ]]; then - lfs_jwt_secret=$(ynh_exec_as "$app" "$install_dir/gitea" generate secret JWT_SECRET) - ynh_app_setting_set --app "$app" --key lfs_jwt_secret --value="$lfs_jwt_secret" - fi -}