[13:47] ion: the debug statement helped. I needed to export HOME=/root [13:48] ion: I wonder what should I set HOME to if I want to run as non super user without a home dir [14:03] su sets HOME here. In the future, when Upstart itself initializes PAM sessions for non-root jobs, that will initialize their session in a similar way. All users have *some* home directory in their passwd entry. [14:04] what do you mean by 'su sets HOME here'? [14:04] that if I'm using su I don't need to export HOME? [14:05] Yeah. su initializes a PAM session for the command, and i’m sure some PAM module creates the proper environment with HOME set. [14:06] shouldn't upstart set HOME=/root if I'm running as root? [14:06] Upstart doesn’t create a PAM session for *any* job at the moment. It sounds like your job wants a PAM session. su 'exec foo' root might be what you want in the meantime. [14:07] ok [14:07] su -c 'exec foo' root, that is. [14:08] export HOME=... might suffice, of course, depending on the program. But su -c '' root will surely run the command in a familiar environment. [14:09] 'su -c' will probably make sure the PATH is also set [14:11] Upstart itself sets PATH to some internal default value, but su -c '' root should create an environment with PATH set according to the PAM configuration for a root login session. [14:12] I probably don't want to use 'erl -detached' so upstart can monitor the process, right? [14:13] Yeah, don’t use that until Upstart 0.10, which can properly monitor all processes, no matter how they behave. [14:13] Current Upstart has some rudimentary support for following forks, but one can upset that functionality very easily. [14:14] what will 'erl -noinput' do? [14:14] you said you use that [14:15] man erl :-) [14:15] ok. thanks [14:16] http://github.com/ion1/camera-control/blob/master/camera-control.upstart [14:16] http://github.com/ion1/camera-control/blob/master/releases/0/run [14:19] thanks [14:20] The Upstart job has some rudimentary log rotation, but i’ll replace it with something saner some day. [14:21] what will you replace it with? [14:21] An Erlang logger that saves plaintext logs but with rotation similar to mf. [14:22] ok [14:22] One might exist already, i haven’t really looked yet. [14:22] it will be nice to have upstart with log rotation and reload event [14:23] Yeah, Upstart might implement the logging of jobs’ std{out,err} first, i’ll just use that then. :-) [18:51] perhaps I've missed it in the docs, but is there a simple "disable" argument for services defined in /etc/init? (similar to the xinetd option)