/srv/irclogs.ubuntu.com/2009/11/21/#upstart.txt

benc1ion: the debug statement helped. I needed to export HOME=/root13:47
benc1ion: I wonder what should I set HOME to if I want to run as non super user without a home dir13:48
ionsu 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:03
benc1what do you mean by 'su sets HOME here'?14:04
benc1that if I'm using su I don't need to export HOME?14:04
ionYeah. su initializes a PAM session for the command, and i’m sure some PAM module creates the proper environment with HOME set.14:05
benc1shouldn't upstart set HOME=/root if I'm running as root?14:06
ionUpstart 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:06
benc1ok14:07
ionsu -c 'exec foo' root, that is.14:07
ionexport HOME=... might suffice, of course, depending on the program. But su -c '' root will surely run the command in a familiar environment.14:08
benc1'su -c'  will probably make sure the PATH is also set14:09
ionUpstart 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:11
benc1I probably don't want to use 'erl -detached' so upstart can monitor the process, right?14:12
ionYeah, don’t use that until Upstart 0.10, which can properly monitor all processes, no matter how they behave.14:13
ionCurrent Upstart has some rudimentary support for following forks, but one can upset that functionality very easily.14:13
benc1what will 'erl -noinput' do?14:14
benc1you said you use that14:14
ionman erl :-)14:15
benc1ok. thanks14:15
ionhttp://github.com/ion1/camera-control/blob/master/camera-control.upstart14:16
ionhttp://github.com/ion1/camera-control/blob/master/releases/0/run14:16
benc1thanks14:19
ionThe Upstart job has some rudimentary log rotation, but i’ll replace it with something saner some day.14:20
benc1what will you replace it with?14:21
ionAn Erlang logger that saves plaintext logs but with rotation similar to mf.14:21
benc1ok14:22
ionOne might exist already, i haven’t really looked yet.14:22
benc1it will be nice to have upstart with log rotation and reload event14:22
ionYeah, Upstart might implement the logging of jobs’ std{out,err} first, i’ll just use that then. :-)14:23
systestperhaps 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)18:51

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!