summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service
Commit message (Collapse)AuthorAgeFilesLines
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-3/+3
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Target mode for systemd service helperLamont Granquist2019-05-291-1/+2
| | | | | | | | | | Makes it so that local cookbook can bounce a remote service over train/ssh/whatever. Works at least for ubuntu. Introduces a fairly rudimentary TrainHelpers class, using some inspiration from ohbye. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix service enable idempotency in sles11 (#8256)dheerajd-msys2019-05-231-1/+3
| | | | | | * fix service enable idempotency in sles11 Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* This hits the ones that are most frequently required.lcg/require-idempotencyLamont Granquist2019-05-202-3/+3
| | | | | | | | | Stops the kernel from scanning through all the activated gems every time in order to resolve names into pathnames. See rubygems/rubygems#2762 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix a bunch of weirdly mangled require linesLamont Granquist2019-05-083-3/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert require to require_relativeLamont Granquist2019-05-0817-34/+34
| | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Prevent accidentally configuring windows_service propertiesJason Barnett2019-04-151-14/+4
| | | | Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Fixes #8195Jason Barnett2019-03-271-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Fix #8080Jason Barnett2019-03-081-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-154-6/+6
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Remove potentially sensitive info from the logsp/fix-7634Stuart Preston2018-09-181-1/+1
| | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* stop parsing init script at the "### END INIT INFO" marker.Guido Schoening2018-08-041-1/+1
| | | | Signed-off-by: Guido Schoening <guido.schoeing@gmail.com>
* fix Style/MutableConstantLamont Granquist2018-07-022-13/+13
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/PreferredHashMethodsLamont Granquist2018-07-021-1/+1
| | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix some Style/StringLiterals introduced by the UnneededInterpolationLamont Granquist2018-07-021-1/+1
| | | | | | cop Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/UnneededInterpolationLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-024-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-151-0/+1
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7297 from jasonwbarnett/fix-windows-startupTim Smith2018-06-031-0/+2
|\ | | | | Fix :configure_startup action to configure delayed start
| * Fix :configure_startup action to configure delayed startJason Barnett2018-05-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* | convert shell_out_with_systems_locale to `default_env: true`lcg/remove-shell-out-with-systems-localeLamont Granquist2018-05-306-31/+32
|/ | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix systemd_unit user property usageMal Graty2018-05-191-1/+1
| | | | | | | Use Etc.getpwnam rather than Etc.getpwuid, since getpwuid expects a UID and the resource provides a string. Signed-off-by: Mal Graty <mal.graty@googlemail.com>
* [Debian/Ubuntu] Detect init script service levelstm/ub_1404_serviceThom May2018-04-231-14/+31
| | | | | | | | | | Debian removed the no-op flag from update-rc.d, and so we're now unlinking services rather than just querying them. Just parsing the scripts ourselves is much safer. Fixes: #7119 Signed-off-by: Thom May <thom@chef.io>
* Avoid lookups for rights of 'LocalSystem' in windows serviceBryan McLellan2018-03-291-1/+2
| | | | | | | | | | LocalSystem is a special account for the service subsystem, and the security subsystem doesn't know about it. It inherits rights from BUILTIN\Administrators so we don't need to check it for SeServiceLogonRight. Even if we look up System it wouldn't show up as it gets that right from hidden membership in BUILTIN\Administrators. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* mechanical conversion of most debug log statements to traceThom May2018-03-2611-67/+67
| | | | Signed-off-by: Thom May <thom@chef.io>
* Remove platfom restrictions in provides and don't require providersTim Smith2018-03-072-2/+2
| | | | | | Don't require providers in the resources since we map these automatically. Also remove or simplify the platform restrictions in the provides lines in the resources. We're not really getting anything from these the way we wire up resources. Signed-off-by: Tim Smith <tsmith@chef.io>
* Chefstyle fixTim Smith2018-03-051-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* better docs for Chef::Provider::Service::Upstart.supports?Brad2018-03-051-0/+1
| | | | Signed-off-by: Brad <bradarv90@gmail.com>
* remove callers of passwd ohai plugintm/disable_chatty_ohaiThom May2018-02-071-1/+1
| | | | Signed-off-by: Thom May <thom@chef.io>
* Add description property to converge configure actionJason Barnett2018-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* chefstyle -aJason Barnett2018-01-261-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Fix existing tests and add new onesJason Barnett2018-01-261-71/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Add :create, :delete, and :configure actions to the windows_service resourceJason Barnett2018-01-251-11/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* Revert "add create and delete actions for windows_service"Lamont Granquist2018-01-221-175/+11
|
* Merge pull request #6595 from ↵Thom May2018-01-221-11/+175
|\ | | | | | | | | jasonwbarnett/feature/add-action_create-to-windows_service add create and delete actions for windows_service
| * add :create, :delete, and :configure actions to the windows_service resource.Jason Barnett2017-11-231-11/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Jason Barnett <jason.w.barnett@gmail.com>
* | Remove update-rc.d -n (dryrun) option.Vinson Lee2018-01-021-2/+2
| | | | | | | | | | | | | | | | init-system-helpers 1.50 removed the broken -n (dryrun) option. https://anonscm.debian.org/git/collab-maint/init-system-helpers.git/commit/?id=e0d3d2261c91c5d3dd8a980fcc5244b3b6ce8158 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* | Fix svcadm clear to only run in maintenance statejsinha/fix_svcadmJaymala Sinha2017-12-071-0/+5
| | | | | | | | | | Signed-off-by: Jaymala Sinha <jsinha@chef.io> Signed-off-by: Patrick Wright <patrick@chef.io>
* | Fix variable name in solaris service providerjsinha/solaris_service_fixJaymala Sinha2017-11-221-2/+1
|/ | | | | | | | Without setting "maintenance" to false service restart fails with error "service is not in a maintenance or degraded state" on solaris nodes Signed-off-by: Jaymala Sinha <jsinha@chef.io>
* Merge pull request #6353 from mikedodge04/launchd2Tim Smith2017-09-061-3/+4
|\ | | | | Launchd should not load launchagents as root.
| * Launchd should not load launchagents as root. #5846Mike Dodge2017-08-251-3/+4
| | | | | | | | | | | | | | | | | | The Launchd resource will load launchagents as root when the mac is sitting on the login window. This is never a desired outcome and is hard to recover from. This change now will now check to see if a user is logged in before loading launchagents. Signed-off-by: Mike Dodge <mikedodge04@gmail.com>
* | Ensure the service_name is always escaped when using systemdDavide Cavalca2017-07-101-11/+12
| | | | | | | | Signed-off-by: Davide Cavalca <dcavalca@fb.com>
* | chef code changes for changing amazon platform_familyLamont Granquist2017-04-032-4/+4
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | convert remaining popen4 code to shell_outLamont Granquist2017-04-012-32/+25
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Chef-13: remove deprecated run_command API entirelyLamont Granquist2017-03-317-7/+0
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #5551 from MarkGibbons/smf_recursive_dependenciesThom May2017-03-211-2/+4
|\ \ | | | | | | smf_recursive_dependencies: Allow solaris services to start recursively.
| * | smf_recursive_dependencies: Separate the svcadm options passed to shell_out.markgibbons2017-02-171-4/+4
| | | | | | | | | | | | Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
| * | Merge branch 'master' of https://github.com/chef/chef into ↵markgibbons2017-02-067-12/+12
| |\ \ | | | | | | | | | | | | smf_recursive_dependencies
| * | | smf_recursive_dependencies: Chef style fixesmarkgibbons2017-01-171-4/+4
| | | | | | | | | | | | | | | | Signed-off-by: Mark Gibbons <mark.gibbons@nordstrom.net>