diff --git a/manifest.json b/manifest.json index f0697fe..e4c25cb 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "11.7.3~ynh1", + "version": "11.7.3~ynh2", "description": { "en": "Gitlab for Yunohost.", "fr": "Gitlab pour YunoHost." diff --git a/scripts/_common.sh b/scripts/_common.sh index 88af934..ef81a42 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -144,6 +144,7 @@ waiting_to_start() { line_match_new="adopted new unicorn master" line_match_existing="adopted existing unicorn master" + line_match_error="master failed to start" clean_check_starting() { # Stop the execution of tail @@ -157,6 +158,10 @@ waiting_to_start() { # get the PID of the tail command local pid_tail=$! + if grep --quiet "${line_match_error}" $templog; then # error, so restart gitlab + gitlab-ctl restart + fi + for i in $(seq 1 3600); do if grep --quiet "${line_match_new}" $templog || grep --quiet "${line_match_existing}" $templog; then echo "Gitlab has correctly started." >&2 diff --git a/scripts/remove b/scripts/remove index 981ff8e..2d14fac 100644 --- a/scripts/remove +++ b/scripts/remove @@ -30,6 +30,8 @@ portUnicorn=$(ynh_app_setting_get "$app" unicorn_port) ynh_print_info "Removing Gitlab..." +gitlab-ctl stop + # Remove gitlab dpkg --remove gitlab-ce