Yann2hi :) to write an upstart script with instances, I want for each instance to read a resource file, and then for all of them, to execute a script07:40
Yann2is there a way to "close" an instance? like instance $conf [....] fi ?07:41
jodhYann2: you have to stop them, or have them stop themselves: http://upstart.ubuntu.com/cookbook/#attempting-to-stop-a-job-that-requires-an-instance-variable07:48
Yann2jodh, that's not what I meant - I mean, the configuration part for an instance starts after instance $VAR , but ends when?07:48
jodhYann2: I think you're misunderstanding what instances are - they are normal jobs but include the stanza 'instance' followed by some variable name (or names). So, a running instance of a job configuration file with a particular value of the instance variable(s) is your instance.07:51
Yann2yes, that's what I need :)07:51
Yann2let me reformulate (sry, english isn't my main language)07:52
Yann2I want to write a script that starts a daemon of which there could be many instances, hence the "instance"07:52
Yann2so I want to read a configuration file, to set all environment variables (they will be different for every instance) - defining, let's say, the port of the daemon07:52
Yann2then I would start the daemon with daemon -p $PORT07:53
Yann2so this is what I would want to do:07:53
Yann2instance $CONF07:53
Yann2. /etc/default/${CONF}07:54
Yann2and then if I want to add additional lines, after the instance, where does the instance section end?07:54
jodhYann2: I don't understand what you mean "add additional lines, after the instance" - the entire .conf file *is* your instance script.07:57
jodhso, you could have a .conf file that did:07:57
jodhinstance $FOO07:57
jodh. /etc/default/$FOO07:58
jodhecho hello from instance $FOO07:58
jodhend script07:58
jodhThen, start 2 instances:07:58
jodhsudo start job FOO="abc"07:58
jodhsudo start job FOO=107:58
Yann2mmmhhhh ok I think I'm getting it :)07:58
jodhYann2: I suggest reading http://upstart.ubuntu.com/cookbook/#instance07:59
jodhin summary, the only "special" syntax for instance jobs is that they have the 'instance' stanza, and the rest of the job (the 'exec' and 'script' and 'pre-start script', etc) have access to the instance variable.08:00
jodhYann2: I've updated the Upstart Cookbook with a simple instance example which I think covers what we have just discussed: http://upstart.ubuntu.com/cookbook/#a-simple-instance-example08:27
Yann2did you save? I see no difference so far08:31
Yann2and the anchor doesn't work08:32
Yann2but I think I got it, it was just me being dump :)08:32
gyre008arrgh…upstart is giving me hedeaches...13:37
gyre008I'm trying to restart a service….and it's just hanging there indefinitely13:37
gyre008anyone idea ?13:38
gyre008this is my job definition13:43
SpamapSgyre008: what is hanging?13:48
gyre008initctl start nginx13:48
gyre008hangs indefinitely13:48
SpamapSgyre008: that means your expect fork is likely wrong13:49
gyre008its messy13:50
SpamapSgyre008: any reason you're not just using the init script for nginx?13:53
gyre008well people are singing how awesome upstart is...13:53
gyre008looks its probably not ;013:53
gyre008this is killing me wtf initctl: Job is already running: nginx13:54
gyre008NO ITS NOT13:54
SpamapSgyre008: its awesome.. for what its meant to be awesome for13:54
SpamapSgyre008: but there's no point in using it when there is already a perfectly good sysvinit script13:55
MFeni'm having a problem getting a service recognized23:53
MFeni added a file to /etc/init/ .. bulkagent.conf23:53
MFenbut status bulkagent doesn't do anything. i have another one i wrote that i set up the same way.. just dropped it into /etc/init.. and that one works23:54
MFenwhat factors can cause a service to be omitted from the list?23:54
MFenthe syntax of the two files is nearly identical. permissions are the same. 23:55

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