/srv/irclogs.ubuntu.com/2012/10/02/#upstart.txt

=== bradleyayers_ is now known as bradleyayers
j4m3sSpamapS, you around?18:11
j4m3sis it possible to specify how many times a program will fork for the expect stanza?19:16
SpamapSj4m3s: I am now, sorry, whats up?19:19
SpamapSj4m3s: no, you can do 1 (expect fork) or 2 (expect daemon)19:19
SpamapSj4m3s: any reasonable program should only ever fork that many times to become the eventual master process anyway19:19
j4m3sbigcouch forks 33 times before 19:19
SpamapSI doubt that19:19
SpamapSj4m3s: those are probably threads19:19
SpamapSthe advice in the cookbook isn't entirely accurate.. I'm convinced the clone bits need to be re-evaluated19:20
j4m3swell i used the cookbook to determine the fork count19:21
j4m3sSpamapS, this is what i have so far19:22
j4m3shttp://pastie.org/private/okibfp83s2oi5lb6emag19:22
SpamapSj4m3s: erts should have a "don't daemonize" flag somewhere..19:23
SpamapSerr, not erts, but erl19:23
j4m3sSpamapS, so if i start a process in pre-start and i want to stop it in post-stop, but it's not being killed. what am i doing wrong? http://pastie.org/private/apk4xedro2xtrbinygsg 20:25
SpamapSj4m3s: that looks like it should, in theory, work20:26
j4m3sbecause it tells me it stop the job, and the main process is stopped but the other one still exists20:27
SpamapSj4m3s: btw, your start on is crap.   "runlevel [2345]" is what you want (Unless you're on a release of Ubuntu before 11.10, then you want 'net-device-up IFACE=whateveryourethXis'20:27
j4m3slol20:27
SpamapSj4m3s: pgrep isn't exactly an exact science20:27
SpamapSj4m3s: perhaps log the pid you try to kill20:28
j4m3sSpamapS, can you tell me if this variable usage is not allowed in upstart 0.6.5? http://pastie.org/private/wk1pteb9vmdkbmepkicq21:12
j4m3sspecifically line 21 & 2221:12
j4m3sie. it works with line 22 and doesn't work with line 2121:13
SpamapSj4m3s: there is no expansion in env statements, even in the latest upstart21:16
j4m3sSpamapS, that answers that! thx again!21:16
j4m3sSpamapS, does that mean i couldn't do var=$foo:/usr/bin ; env PATH=$var ?21:18
SpamapSj4m3s: correct, that will not work21:27
j4m3sSpamapS, will variable expansion work in an exec stanza?21:39
SpamapSj4m3s: yes21:43
SpamapSexec and script are fine21:43
SpamapSand start/stop on too21:43
SpamapSand instance21:43
j4m3sSpamapS, so i am trying to use $EMU in the exec and it's not being set properly any ideas? http://pastie.org/private/ti12eytjhg23h07evyohww21:47
SpamapSj4m3s: in a script statement, you don't want to say 'env XXX...'22:01
SpamapSj4m3s: just XXX=...22:01
SpamapSj4m3s: and you don't need to export it22:01
j4m3sSpamapS, ok gotcha22:01
SpamapSj4m3s: as the shell that you're setting it in, is the one evaluating the exec line22:01
j4m3sSpamapS, can you have two execs in a script statement?22:03
SpamapSj4m3s: sure, but only one will happen because exec replaces the current process22:04
SpamapSj4m3s: you can background stuff tho22:04
SpamapSfoo1 & exec foo222:04
j4m3sSpamapS, is it possible to do something like TMP=`env VAR=$foo` within a script statement?23:09
j4m3sSpamapS, is there another way i can set an environment variable in that shell that can handle variable expansion?23:11
j4m3sSpamapS, http://pastie.org/private/df0a1urpr2ajq1dslzjaq23:12

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