diff options
author | rishichawda <rishichawda@users.noreply.github.com> | 2021-10-29 11:12:26 +0530 |
---|---|---|
committer | rishichawda <rishichawda@users.noreply.github.com> | 2021-10-29 11:12:26 +0530 |
commit | c1c4bec33df8c143d69818f9538c12dded1fe110 (patch) | |
tree | ab13193955f5dd87a5ecb0d7a9b859eef254e567 | |
parent | 8a13436ced9b9a0bfb006f70227b861eddaa323c (diff) | |
download | chef-c1c4bec33df8c143d69818f9538c12dded1fe110.tar.gz |
run launchctl with elevated permissionfix-chef-client-launchd-resource
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
-rw-r--r-- | lib/chef/resource/chef_client_launchd.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/chef_client_launchd.rb b/lib/chef/resource/chef_client_launchd.rb index 2b00c097f0..27a4c184ba 100644 --- a/lib/chef/resource/chef_client_launchd.rb +++ b/lib/chef/resource/chef_client_launchd.rb @@ -134,7 +134,7 @@ class Chef standard_error_path ::File.join(new_resource.log_directory, new_resource.log_file_name) program_arguments ["/bin/bash", "-c", - "echo; echo #{ChefUtils::Dist::Infra::PRODUCT} launchd daemon config has been updated. Manually unloading and reloading the daemon; echo Now unloading the daemon; /bin/launchctl unload /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist; sleep 2; echo Now loading the daemon; /bin/launchctl load /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist"] + "echo; echo #{ChefUtils::Dist::Infra::PRODUCT} launchd daemon config has been updated. Manually unloading and reloading the daemon; echo Now unloading the daemon; sudo /bin/launchctl unload /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist; sleep 2; echo Now loading the daemon; sudo /bin/launchctl load /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist"] action :enable # enable creates the plist & triggers service restarts on change end |