Module: Homebrew::Services::System::Systemctl Private

Defined in:
services/system/systemctl.rb

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Class Method Summary collapse

Class Method Details

.executablePathname?

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



9
10
11
# File 'services/system/systemctl.rb', line 9

def self.executable
  @executable ||= T.let(which("systemctl"), T.nilable(Pathname))
end

.popen_read(*args) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



31
32
33
# File 'services/system/systemctl.rb', line 31

def self.popen_read(*args)
  _run(*args, mode: :read)
end

.quiet_run(*args) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



27
28
29
# File 'services/system/systemctl.rb', line 27

def self.quiet_run(*args)
  _run(*args, mode: :quiet)
end

.reset_executable!void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

This method returns an undefined value.



14
15
16
# File 'services/system/systemctl.rb', line 14

def self.reset_executable!
  @executable = nil
end

.run(*args) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



23
24
25
# File 'services/system/systemctl.rb', line 23

def self.run(*args)
  _run(*args, mode: :default)
end

.scopeString

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



19
20
21
# File 'services/system/systemctl.rb', line 19

def self.scope
  System.root? ? "--system" : "--user"
end