TeckFire

Silent Sentinel com.invictus.sentinel.plist Launch Daemon

Mar 3rd, 2026
1,400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | Source Code | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <!--
  4. com.invictus.sentinel.plist
  5. Install to: /Library/LaunchDaemons/com.invictus.sentinel.plist
  6. Load with: sudo launchctl load /Library/LaunchDaemons/com.invictus.sentinel.plist
  7. Owner: root:wheel, permissions 644
  8.  
  9. KEY DECISIONS:
  10.  
  11. ProcessType = Interactive
  12. Tells launchd to schedule this daemon at the highest QoS class
  13. available to background daemons. Combined with the in-script
  14. `renice -n -20`, this gives Sentinel two layers of priority:
  15. one at the launchd scheduling level, one at the BSD nice level.
  16.  
  17. ThrottleInterval = 0
  18. By default launchd imposes a 10s throttle between restarts on
  19. crash. Setting to 0 removes this delay so Sentinel restarts
  20. immediately if it ever exits unexpectedly (e.g. OOM kill).
  21. Safe here because the script has its own sleep-based rate limiting.
  22.  
  23. RunAtLoad = true
  24. Sentinel starts as soon as the plist is loaded, which on this
  25. LaunchDaemon path happens very early in the boot sequence —
  26. before most user-space services are running. This is as close
  27. to a "preboot hook" as launchd allows without kernel extensions.
  28.  
  29. KeepAlive = true
  30. launchd will restart Sentinel if it ever exits. Combined with
  31. ThrottleInterval=0, this makes Sentinel effectively indestructible
  32. from user-space.
  33.  
  34. AbandonProcessGroup = true
  35. When launchd stops the daemon (e.g. on shutdown), it won't wait
  36. for child processes (the ghost-eviction subshell, xargs children)
  37. to exit before proceeding. Prevents shutdown delays.
  38.  
  39. NOTE ON "PREBOOT HOOKS":
  40. There is no OpenCore or EFI mechanism that can run BSD sysctls
  41. before the kernel boots — sysctls don't exist at that stage.
  42. The true "earliest possible" injection point for sysctl tunables
  43. on macOS is a LaunchDaemon with RunAtLoad=true at system boot,
  44. which is exactly what this plist achieves. The 10s sleep in the
  45. script is the only thing delaying injection, and it's necessary
  46. for OCLP kext stability on this hardware.
  47. -->
  48. <plist version="1.0">
  49. <dict>
  50.  
  51. <key>Label</key>
  52. <string>com.invictus.sentinel</string>
  53.  
  54. <key>ProgramArguments</key>
  55. <array>
  56. <string>/bin/zsh</string>
  57. <string>/usr/local/bin/silent_sentinel.sh</string>
  58. </array>
  59.  
  60. <!-- Start immediately at boot, before user session -->
  61. <key>RunAtLoad</key>
  62. <true/>
  63.  
  64. <!-- Restart immediately on exit, no throttle delay -->
  65. <key>KeepAlive</key>
  66. <true/>
  67. <key>ThrottleInterval</key>
  68. <integer>0</integer>
  69.  
  70. <!-- Highest QoS class available to LaunchDaemons -->
  71. <key>ProcessType</key>
  72. <string>Interactive</string>
  73.  
  74. <!-- Don't block shutdown waiting for our subshells -->
  75. <key>AbandonProcessGroup</key>
  76. <true/>
  77.  
  78. <!-- Logging — tail -f /var/log/sentinel.log to observe -->
  79. <key>StandardOutPath</key>
  80. <string>/var/log/sentinel.log</string>
  81. <key>StandardErrorPath</key>
  82. <string>/var/log/sentinel.log</string>
  83.  
  84. </dict>
  85. </plist>
  86.  
Advertisement
Add Comment
Please, Sign In to add comment