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