Class: SystemCheck::App::SystemdUnitFilesOrInitScriptExistCheck
- Inherits:
-
BaseCheck
- Object
- BaseCheck
- SystemCheck::App::SystemdUnitFilesOrInitScriptExistCheck
- Defined in:
- lib/system_check/app/systemd_unit_files_or_init_script_exist_check.rb
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
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_exist_check.rb', line 13 def check? 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' ] script_path = '/etc/init.d/gitlab' unit_paths.all? { |s| File.exist?(s) } || File.exist?(script_path) end |
#show_error ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_exist_check.rb', line 28 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
9 10 11 |
# File 'lib/system_check/app/systemd_unit_files_or_init_script_exist_check.rb', line 9 def skip? omnibus_gitlab? end |