[rancid] Re: launchd and rancid
daniel.medina at gmail.com
Sat Jul 25 19:24:37 UTC 2009
On Sat, Jul 25, 2009 at 10:14:53AM -0500, Josh Rogers wrote:
> I'm trying to get launchd to start rancid daily, but have had a lot of
> trouble (assuredly because of my inexperience with launchd). Launchd
> is launching the process, and log files are being written as www (the
> correct user), but when I look at the log file, this is at the top of
> Trying to get all of the configs.
> can't read "env(HOME)": no such variable
> I believe this is because the environment isn't set up properly. If I
> run rancid-run from the command line (bash) "sudo -u www rancid-run"
> it runs fine.
$ launchctl export
say? HOME is one of the variables that's usually set for you, EX:
PATH="/usr/bin:/bin:/usr/sbin:/sbin"; export PATH;
TMPDIR="/var/folders/0p/0pdl6kW0HyGu7FSWcApHrU+++TI/-Tmp-/"; export TMPDIR;
SHELL="/bin/bash"; export SHELL;
HOME="/Users/medina"; export HOME;
USER="medina"; export USER;
LOGNAME="medina"; export LOGNAME;
Optionally, you could make a shell springboard, EX:
# debug env(HOME) setting problem
/usr/bin/printenv > /tmp/printenv.log
and then run that shell script from launchd.
More information about the Rancid-discuss