=== JanC_ is now known as JanC [14:36] Can upstart print now to the kmsg instad of the syslog with some option, configuration ? [14:41] kmsg can be written to by userspace programs? [14:42] ofc. [14:42] since 2002 or something very close to that. [14:44] this thread: http://lkml.indiana.edu/hypermail/linux/kernel/0208.1/1501.html [14:45] http://svn.savannah.nongnu.org/viewvc/sysvinit/trunk/src/bootlogd.c?root=sysvinit&view=markup [14:45] sysvinit can also do it. [15:21] hi [15:22] how can I set an environment using source ?? [15:23] . /path/to/script [15:23] (!!!!!) [15:28] :-m [15:28] hi ion [15:28] exec . /path/to/script ? [15:28] or just . /path/to/script ? [15:28] script [15:28] . /foo/bar [15:28] (use variables defined there) [15:28] end script [15:29] ok [15:30] and then, after the "." command I should use "exec program ...", isn't it? [15:30] yeah [15:31] Also note that the variables aren’t exported. If you need that, do [15:31] set -a [15:31] . /foo/bar [15:32] ok [15:32] how can I get the output of the execution of a program? [15:33] As the first line of the script section, [15:33] exec >/path/to/logfile 2>&1 [15:33] ok [15:33] Or >>/path/to/logfile if you want to append [15:36] damn!! [15:36] I thought that the lines betwen script were in some special language xD [15:36] and it was sh! [15:37] init(5) [15:37] :) [15:37] thanks ion, you saved my day :) [15:42] the job name in "start on"/"stop on" is the same as the .conf file name? [15:42] yes [15:42] so [15:42] if I add "stop on stopped X" [15:42] and I stop X [15:43] then the process with "stop on..." should stop? [15:43] Yes. If you want your job to stop first, ‘stop on stopping X’ [15:44] ok [15:44] I suppose it's the same for starting :) [15:45] yes [15:45] :-m it doesn't work here [15:45] do I need something more ? [15:45] If you run ‘start yourjob’, does it start properly? If you run ‘stop yourjob’ does it stop properly? [15:46] yes [15:46] call it job B (the one with "stop on stopping A" and "start on starting A") [15:46] B start and stops [15:46] A starts and stops [15:46] but the event in A is not executed in B [15:47] this is why I ask you if I need to add something more [15:48] You’ll most likely want either started/stopping or starting/stopped as the event pair for start/stop on. [15:48] ok [15:49] I want starting/stopped [15:49] but it doesn't works here [15:49] logs don't show anything special [15:49] it just doesn't happens [15:51] Try running initctl log-priority info [15:51] ok [15:52] I see how process A (nginx) start and stops [15:52] but I don't see any reference to process B (django) [15:53] Please pastebin django.conf [15:53] http://dpaste.com/355958/ [15:53] oh! sorry [15:53] I will paste the .conf [15:54] http://dpaste.com/355962/ [15:54] The latter start/stop lines override the former ones. [15:55] o_O [15:56] so? [15:56] do I need to remove them or to change their position? [15:57] Remove them [15:57] ok ion, I did that and now it works :D [15:57] thank you very much! [15:57] upstart is great but need better doc :-/ [15:59] Granted, init(5) doesn’t explicitly say multiple ‘start/stop on’ lines don’t work, but it does say how multiple start/stop events *are* given. [16:08] The documentation isn’t that bad IMHO. [16:08] But sure, go ahead and file a bug report about the multiple ‘start/stop on’ lines. Perhaps even provide a patch to the documentation. :-) [16:10] I will try tomorrow if I've time [16:10] thanks ion :) [16:10] bye! [16:10] ion: there might still be how-tos about ancient upstart versions around that are now confusing people though (where multiple "start on" lines was allowed/required)