mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
* launchd: fix for user-level services
* fix changelog fragment number
(cherry picked from commit 2794dc7b02
)
Co-authored-by: tomaszn <tomaszn@users.noreply.github.com>
This commit is contained in:
parent
4a5276b589
commit
feabad39f4
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/899_launchd_user_service.yml
Normal file
2
changelogs/fragments/899_launchd_user_service.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- launchd - fix for user-level services (https://github.com/ansible-collections/community.general/issues/896).
|
|
@ -154,7 +154,7 @@ class Plist:
|
||||||
"""Finds the plist file associated with a service"""
|
"""Finds the plist file associated with a service"""
|
||||||
|
|
||||||
launchd_paths = [
|
launchd_paths = [
|
||||||
'~/Library/LaunchAgents',
|
os.path.expanduser('~/Library/LaunchAgents'),
|
||||||
'/Library/LaunchAgents',
|
'/Library/LaunchAgents',
|
||||||
'/Library/LaunchDaemons',
|
'/Library/LaunchDaemons',
|
||||||
'/System/Library/LaunchAgents',
|
'/System/Library/LaunchAgents',
|
||||||
|
@ -163,7 +163,7 @@ class Plist:
|
||||||
|
|
||||||
for path in launchd_paths:
|
for path in launchd_paths:
|
||||||
try:
|
try:
|
||||||
files = os.listdir(os.path.expanduser(path))
|
files = os.listdir(path)
|
||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue