Class: SystemCheck::App::SystemdUnitFilesOrInitScriptUpToDateCheck
- Inherits:
-
BaseCheck
- Object
- BaseCheck
- SystemCheck::App::SystemdUnitFilesOrInitScriptUpToDateCheck
- Defined in:
- lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb
Constant Summary collapse
- SCRIPT_PATH =
'/etc/init.d/gitlab'
- UNIT_PATHS =
[ '/usr/local/lib/systemd/system/gitlab-gitaly.service', '/usr/local/lib/systemd/system/gitlab-mailroom.service', '/usr/local/lib/systemd/system/gitlab-puma.service', '/usr/local/lib/systemd/system/gitlab-sidekiq.service', '/usr/local/lib/systemd/system/gitlab.slice', '/usr/local/lib/systemd/system/gitlab.target', '/usr/local/lib/systemd/system/gitlab-workhorse.service' ].freeze
Instance Attribute Summary
Attributes inherited from BaseCheck
Instance Method Summary collapse
Methods inherited from BaseCheck
#can_repair?, #can_skip?, check_fail, check_pass, display_name, #multi_check, #multi_check?, #repair!, set_check_fail, set_check_pass, set_name, set_skip_reason, skip_reason
Methods included from Helpers
#finished_checking, #fix_and_rerun, #for_more_information, #omnibus_gitlab?, #sanitized_message, #see_installation_guide_section, #should_sanitize?, #start_checking, #sudo_gitlab, #try_fixing_it
Methods included from Gitlab::TaskHelpers
#ask_to_continue, #checkout_or_clone_version, #checkout_version, #clone_repo, #get_version, #gid_for, #gitlab_user, #gitlab_user?, #invoke_and_time_task, #os_name, #prompt, #prompt_for_password, #repository_storage_paths_args, #run_and_match, #run_command, #run_command!, #uid_for, #user_home, #warn_user_is_not_gitlab
Instance Method Details
#check? ⇒ Boolean
30 31 32 33 34 35 36 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb', line 30 def check? if unit_files_exist? return unit_files_up_to_date? end init_file_up_to_date? end |
#show_error ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb', line 38 def show_error try_fixing_it( 'Install the Service' ) for_more_information( see_installation_guide_section('Install the Service') ) fix_and_rerun end |
#skip? ⇒ Boolean
20 21 22 23 24 25 26 27 28 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_up_to_date_check.rb', line 20 def skip? return true if omnibus_gitlab? unless unit_files_exist? || init_file_exists? self.skip_reason = "can't check because of previous errors" true end end |