Skip to content

Commit

Permalink
services_cli: fix usage of systemctl_args with --no-block.
Browse files Browse the repository at this point in the history
These places were not changed correctly.
  • Loading branch information
MikeMcQuaid committed Oct 10, 2023
1 parent f9d59c8 commit ae18ee5
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit ae18ee5

Please sign in to comment.