mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-09-13 05:38:05 -04:00
misc/ has a systemd unit and an init.d script, so on macOS nothing restarts ZoneMinder after a reboot. This is the launchd counterpart, generated next to zoneminder.service with the same substitutions. Mapping the unit across needed three decisions worth recording. zmpkg.pl forks zmdc.pl and returns, which systemd calls Type=forking. launchd has no such notion and by default kills everything left in a job's process group once the job exits - which would be all of ZoneMinder, immediately. AbandonProcessGroup=true disables exactly that. So the job starts ZoneMinder rather than supervising it, and zmdc.pl and zmwatch.pl go on restarting the daemons themselves as they always have. There is no equivalent of ExecStop, so unloading the job does not stop ZoneMinder. The comment in the file says so and gives the stop-then- unload order rather than leaving people to find out. There is no equivalent of After= or Requires= either. launchd only orders jobs it manages, and a Homebrew MariaDB is not one, so ZoneMinder can start before the database is listening. zmdc.pl retries, and the comment points at zmdc.log for when it matters. Generated but not installed, matching how zoneminder.service is treated: /Library/LaunchDaemons is read at boot, so putting a job there is the installer's decision and not the build's. Verified with plutil -lint and plutil -p on the generated file, and every key checked against launchd.plist(5). Not loaded here - that needs an installed ZoneMinder to start. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5KL9Xbi7K5aGsauLtd8tG