Read environment variables from a file in launchd?

Zhenfu Shi i0ntempest at macports.org
Mon Jul 17 18:58:05 UTC 2023


Hi all,
I’m looking for a way to import environment variables for a process started by launchd. systemd on Linux has EnvironmentFile key which allows env vars to be read from a file, can launchd do something similar?
I’m asking this because my cloudflared port has command line options hardcoded into its launchd script which gets overwritten on every upgrade. If I can somehow make those options read in from another file I can make them configuable to the users.

Thanks,
Zhenfu


More information about the macports-dev mailing list