From 111cd4e684175c2a4d40fb694ae1d320b429156c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 2 Nov 2021 11:55:29 +0100 Subject: [PATCH] Discard logs if the reconfigure process passes --- scripts/upgrade | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5006f67..9d442f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -308,7 +308,10 @@ then chown root:root "$config_path/gitlab-persistent.rb" chmod 640 "$config_path/gitlab-persistent.rb" - gitlab-ctl reconfigure > /dev/null + # During large migrations, the logs are too big to be sent to paste.yunohost.org + # Send the reconfigure logs in a file, and if the process succeeds, just delete it. + gitlab-ctl reconfigure > "/tmp/gitlab_upgrade_$current_version.log" + ynh_secure_remove --file="/tmp/gitlab_upgrade_$current_version.log" fi fi done @@ -325,7 +328,7 @@ touch "$config_path/gitlab-persistent.rb" chown root:root "$config_path/gitlab-persistent.rb" chmod 640 "$config_path/gitlab-persistent.rb" -gitlab-ctl reconfigure > /dev/null +gitlab-ctl reconfigure # Allow ssh for git usermod -a -G "ssh.app" "git"