Setting environment vars using .plist file and launchctl

Joined
Oct 16, 2017
Messages
1
Reaction score
0
Hi

I'm a longtime Unix/Linux man getting to grips with the Mac (a present from my daughter).
I have summarised my experience so far on my website: og.co.nz in file macos.pdf or macos.html
Ive created a .plist file:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nz.co.og.env</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<key>PGHOST</key>
<string>localhost</string>
<key>PGPORT</key>
<string>5432</string>
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>

I expected this to work. It didn't !
I would welcome advice about host to launch it properly and keep it working
Thanks
John O'Gorman
 
Hello and welcome.

Sorry for that late reply. Unfortunately, your query is above my experience, so there's not much I could help with.

Nice website though!

C
 
Back
Top