From 13b46e0069f913a2a17d0b77547c988da35d8bae Mon Sep 17 00:00:00 2001 From: Kayou Date: Sat, 9 Feb 2019 22:18:57 +0100 Subject: [PATCH] Fix package_linter --- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/change_url | 10 +++++----- scripts/restore | 21 +++++++++++---------- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/manifest.json b/manifest.json index dee9c8f..90697a2 100644 --- a/manifest.json +++ b/manifest.json @@ -2,10 +2,10 @@ "name": "Gitlab", "id": "gitlab", "packaging_format": 1, - "version": "11.7.5~ynh2", + "version": "11.7.5~ynh3", "description": { - "en": "Gitlab for Yunohost.", - "fr": "Gitlab pour YunoHost." + "en": "GitLab is a Git-repository manager.", + "fr": "GitLab est un gestionnaire de dépôts Git." }, "url": "https://gitlab.com", "license": "MIT", diff --git a/scripts/_common.sh b/scripts/_common.sh index ef81a42..eb45751 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -119,7 +119,7 @@ setup_source() { ynh_print_info "Installing Gitlab..." #Fix for the CI - if sudo grep -qa container=lxc /proc/1/environ; then + if grep -qa container=lxc /proc/1/environ; then dpkg -i $src_filename || true # This command will fail in lxc env sed -i 's/command \"cat \/etc\/sysctl.conf \/etc\/sysctl.d\/\*.conf | sysctl -e -p -\"/command \"cat \/etc\/sysctl.conf\"/g' $final_path/embedded/cookbooks/package/resources/sysctl.rb dpkg --configure gitlab-ce || true diff --git a/scripts/change_url b/scripts/change_url index 7beb23b..6035985 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -74,8 +74,8 @@ nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf if [ $change_path -eq 1 ]; then ynh_print_info "Changing path..." - sudo gitlab-ctl stop unicorn - sudo gitlab-ctl stop sidekiq + gitlab-ctl stop unicorn + gitlab-ctl stop sidekiq # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" @@ -103,11 +103,11 @@ fi config_gitlab -sudo gitlab-ctl reconfigure +gitlab-ctl reconfigure if [ $change_path -eq 1 ]; then - sudo gitlab-ctl restart - sudo gitlab-ctl restart unicorn + gitlab-ctl restart + gitlab-ctl restart unicorn fi #================================================= diff --git a/scripts/restore b/scripts/restore index 04f954a..041fb92 100644 --- a/scripts/restore +++ b/scripts/restore @@ -9,6 +9,17 @@ # Source YunoHost helpers source /usr/share/yunohost/helpers + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +ynh_clean_setup() { + + rm /var/opt/gitlab/backups/*_gitlab_backup.tar + true +} + # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -25,16 +36,6 @@ fi # Load common variables and helpers source _common.sh -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup() { - - rm /var/opt/gitlab/backups/*_gitlab_backup.tar - true -} - #================================================= # LOAD SETTINGS #=================================================