diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index edb5df3..87fd245 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -8,5 +8,9 @@ gitlab_filename="gitlab-ce-${gitlab_version}.deb" # Action to do in case of failure of the package_check package_check_action() { - ynh_replace_string --match_string="command \"sysctl -e --system\"" --replace_string="command \"sysctl -e --system || true\"" --target_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb" + local sysctl_file="$final_path/embedded/cookbooks/package/resources/gitlab_sysctl.rb" + if [ ! -f "$sysctl_file" ]; then + sysctl_file="$final_path/embedded/cookbooks/package/resources/sysctl.rb" + fi + ynh_replace_string --match_string="command \"sysctl -e --system\"" --replace_string="command \"sysctl -e --system || true\"" --target_file=$sysctl_file }