Skip to content

Instantly share code, notes, and snippets.

@varenc
Forked from dmattera/launchctl_man_pages.md
Created January 6, 2022 00:49
Show Gist options
  • Select an option

  • Save varenc/4be11dcf11aa26bc71fcae28f24b187d to your computer and use it in GitHub Desktop.

Select an option

Save varenc/4be11dcf11aa26bc71fcae28f24b187d to your computer and use it in GitHub Desktop.

Revisions

  1. @dmattera dmattera revised this gist Aug 11, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions launchctl_man_pages.md
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    This list was auto-generated on macOS 10.15 (Catalina) using a script that did the following:

    1. grabbed all the .plist files located in the 5 folders used by `launchctl`:
    1. grabbed the name of all the `.plist` files located in the 5 folders used by `launchctl`:

    - `~/Library/LaunchAgents` Per-user agents provided by the user.
    - `/Library/LaunchAgents` Per-user agents provided by the administrator.
    - `/Library/LaunchDaemons` System wide daemons provided by the administrator.
    - `/System/Library/LaunchAgents` OS X Per-user agents.
    - `/System/Library/LaunchDaemons` OS X System wide daemons.

    2. tried to automatically find a man page in `/usr/share/man/man8` using couple of string search methods based on the Agent/Daemon's plist filename
    2. tried to automatically find a man page in `/usr/share/man/man8` using couple of string search methods based on the Agent/Daemon's `.plist` filename
    3. This was the only directory I could find where man pages were located for any launchctl services. If you know of any others, please let me know and I'll add them to the script.
    4. if a matching man page file was found, it extracted the content from the file in a somewhat-formatted fashion

  2. @dmattera dmattera revised this gist Aug 11, 2021. 1 changed file with 2 additions and 6 deletions.
    8 changes: 2 additions & 6 deletions launchctl_man_pages.md
    Original file line number Diff line number Diff line change
    @@ -8,13 +8,9 @@ This list was auto-generated on macOS 10.15 (Catalina) using a script that did t
    - `/System/Library/LaunchAgents` OS X Per-user agents.
    - `/System/Library/LaunchDaemons` OS X System wide daemons.

    2. tried to automatically find a man page in `/usr/share/man/man8` using one of two methods:

    - removing the `com.apple.` and `.plist` strings from the name of the .plist file (ex. for `com.apple.rtcreportingd.plist` it checked for a man file named `rtcreportingd`)
    - for services with additional subdomains in their names other than `com.apple.` (such as `com.apple.audio.coreaudiod.plist`), it parsing out only the string between the last `.` and `.plist` (ex. for `com.apple.audio.coreaudiod.plist` it checked for a man file named `coreaudiod`)

    2. tried to automatically find a man page in `/usr/share/man/man8` using couple of string search methods based on the Agent/Daemon's plist filename
    3. This was the only directory I could find where man pages were located for any launchctl services. If you know of any others, please let me know and I'll add them to the script.
    4. extracted the content in the raw man page file in a somewhat-formatted fashion
    4. if a matching man page file was found, it extracted the content from the file in a somewhat-formatted fashion


    |name|path|has_man_page|man_page_path|man_page|
  3. @dmattera dmattera created this gist Aug 11, 2021.
    656 changes: 656 additions & 0 deletions launchctl_man_pages.md
    656 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.