Skip to content

Commit

Permalink
Merge pull request #596 from MikeMcQuaid/systemctl_args_no_block
Browse files Browse the repository at this point in the history
services_cli: fix usage of `systemctl_args` with `--no-block`.
  • Loading branch information
MikeMcQuaid authored Oct 10, 2023
2 parents f9d59c8 + ae18ee5 commit f130d39
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 f130d39

Please sign in to comment.