benc1 | ion: the debug statement helped. I needed to export HOME=/root | 13:47 |
---|---|---|
benc1 | ion: I wonder what should I set HOME to if I want to run as non super user without a home dir | 13:48 |
ion | 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:03 |
benc1 | what do you mean by 'su sets HOME here'? | 14:04 |
benc1 | that if I'm using su I don't need to export HOME? | 14:04 |
ion | Yeah. su initializes a PAM session for the command, and i’m sure some PAM module creates the proper environment with HOME set. | 14:05 |
benc1 | shouldn't upstart set HOME=/root if I'm running as root? | 14:06 |
ion | 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:06 |
benc1 | ok | 14:07 |
ion | su -c 'exec foo' root, that is. | 14:07 |
ion | export 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 set | 14:09 |
ion | 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:11 |
benc1 | I probably don't want to use 'erl -detached' so upstart can monitor the process, right? | 14:12 |
ion | Yeah, don’t use that until Upstart 0.10, which can properly monitor all processes, no matter how they behave. | 14:13 |
ion | Current Upstart has some rudimentary support for following forks, but one can upset that functionality very easily. | 14:13 |
benc1 | what will 'erl -noinput' do? | 14:14 |
benc1 | you said you use that | 14:14 |
ion | man erl :-) | 14:15 |
benc1 | ok. thanks | 14:15 |
ion | http://github.com/ion1/camera-control/blob/master/camera-control.upstart | 14:16 |
ion | http://github.com/ion1/camera-control/blob/master/releases/0/run | 14:16 |
benc1 | thanks | 14:19 |
ion | The Upstart job has some rudimentary log rotation, but i’ll replace it with something saner some day. | 14:20 |
benc1 | what will you replace it with? | 14:21 |
ion | An Erlang logger that saves plaintext logs but with rotation similar to mf. | 14:21 |
benc1 | ok | 14:22 |
ion | One might exist already, i haven’t really looked yet. | 14:22 |
benc1 | it will be nice to have upstart with log rotation and reload event | 14:22 |
ion | Yeah, Upstart might implement the logging of jobs’ std{out,err} first, i’ll just use that then. :-) | 14:23 |
systest | 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) | 18:51 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!