Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services_cli: fix usage of systemctl_args with --no-block. #596

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/service/services_cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def stop(targets, verbose: false, no_wait: false)
end

if System.systemctl?
quiet_system(*System.systemctl_args, "disable", "--now", service.service_name)
quiet_system(*systemctl_args, "disable", "--now", service.service_name)
elsif System.launchctl?
quiet_system System.launchctl, "bootout", "#{System.domain_target}/#{service.service_name}"
unless no_wait
Expand All @@ -165,7 +165,7 @@ def stop(targets, verbose: false, no_wait: false)

rm service.dest if service.dest.exist?
# Run daemon-reload on systemctl to finish unloading stopped and deleted service.
safe_system(*System.systemctl_args, "daemon-reload") if System.systemctl?
safe_system(*systemctl_args, "daemon-reload") if System.systemctl?

if service.pid? || service.loaded?
opoo "Unable to stop `#{service.name}` (label: #{service.service_name})"
Expand Down