/srv/irclogs.ubuntu.com/2011/01/26/#upstart.txt

=== JanC_ is now known as JanC
djszapiCan upstart print now to the kmsg instad of the syslog with some option, configuration ?14:36
ionkmsg can be written to by userspace programs?14:41
djszapiofc.14:42
djszapisince 2002 or something very close to that.14:42
djszapithis thread: http://lkml.indiana.edu/hypermail/linux/kernel/0208.1/1501.html14:44
djszapihttp://svn.savannah.nongnu.org/viewvc/sysvinit/trunk/src/bootlogd.c?root=sysvinit&view=markup14:45
djszapisysvinit can also do it.14:45
nodiehi15:21
nodiehow can I set an environment using source ??15:22
ion. /path/to/script15:23
ion(!!!!!)15:23
nodie:-m15:28
nodiehi ion 15:28
nodieexec . /path/to/script ?15:28
nodieor just . /path/to/script ?15:28
ionscript15:28
ion  . /foo/bar15:28
ion  (use variables defined there)15:28
ionend script15:28
nodieok15:29
nodieand then, after the "." command I should use "exec program ...", isn't it?15:30
ionyeah15:30
ionAlso note that the variables aren’t exported. If you need that, do15:31
ion  set -a15:31
ion  . /foo/bar15:31
nodieok15:32
nodiehow can I get the output of the execution of a program?15:32
ionAs the first line of the script section,15:33
ion  exec >/path/to/logfile 2>&115:33
nodieok15:33
ionOr >>/path/to/logfile if you want to append15:33
nodiedamn!! 15:36
nodieI thought that the lines betwen script were in some special language xD15:36
nodieand it was sh!15:36
ioninit(5)15:37
nodie:)15:37
nodiethanks ion, you saved my day :)15:37
nodiethe job name in "start on"/"stop on" is the same as the .conf file name?15:42
ionyes15:42
nodieso 15:42
nodieif I add "stop on stopped X"15:42
nodieand I stop X 15:42
nodiethen the process with "stop on..." should stop?15:43
ionYes. If you want your job to stop first, ‘stop on stopping X’15:43
nodieok15:44
nodieI suppose it's the same for starting :)15:44
ionyes15:45
nodie:-m it doesn't work here15:45
nodiedo I need something more ?15:45
ionIf you run ‘start yourjob’, does it start properly? If you run ‘stop yourjob’ does it stop properly?15:45
nodieyes15:46
nodiecall it job B (the one with "stop on stopping A" and "start on starting A")15:46
nodieB start and stops15:46
nodieA starts and stops15:46
nodiebut the event in A is not executed in B15:46
nodiethis is why I ask you if I need to add something more15:47
ionYou’ll most likely want either started/stopping or starting/stopped as the event pair for start/stop on.15:48
nodieok15:48
nodieI want starting/stopped15:49
nodiebut it doesn't works here15:49
nodielogs don't show anything special15:49
nodieit just doesn't happens15:49
ionTry running initctl log-priority info15:51
nodieok15:51
nodieI see how process A (nginx) start and stops15:52
nodiebut I don't see any reference to process B (django)15:52
ionPlease pastebin django.conf15:53
nodiehttp://dpaste.com/355958/15:53
nodieoh! sorry15:53
nodieI will paste the .conf15:53
nodiehttp://dpaste.com/355962/15:54
ionThe latter start/stop lines override the former ones.15:54
nodieo_O15:55
nodieso?15:56
nodiedo I need to remove them or to change their position?15:56
ionRemove them15:57
nodieok ion, I did that and now it works :D15:57
nodiethank you very much!15:57
nodieupstart is great but need better doc :-/15:57
ionGranted, 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
ionThe documentation isn’t that bad IMHO.16:08
ionBut 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
nodieI will try tomorrow if I've time 16:10
nodiethanks ion :)16:10
nodiebye!16:10
JanCion: 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!