plundra | Hey, would you look at that. | 10:29 |
---|---|---|
plundra | Ok, got a quick question for you; I can't find any built in way of doing it, so, are you supposed to change directory and user in the pre-start script, or in the actual start-script? | 10:30 |
mbiebl | plundra: what do you want to do? | 10:33 |
plundra | Launch an application from a certain directory and with another user. | 10:33 |
plundra | So (cd /path ; sudo -u foo ./crap) or whatever :) | 10:34 |
plundra | Maybe using su instead. | 10:34 |
mbiebl | do it within a script .. end script | 10:39 |
mbiebl | and run su via exec | 10:40 |
plundra | Ok, so pre-start script, right? | 10:40 |
mbiebl | no script ... end script | 10:40 |
plundra | Ok, but why not start it within the script too? | 10:40 |
mbiebl | http://pastebin.ca/1276763 | 10:41 |
plundra | Ah | 10:42 |
plundra | Cool, seem to work just fine, respawn and everything :) | 10:44 |
mbiebl | do you want to monitor the application? | 10:44 |
mbiebl | ah, you seem to have figured that out already | 10:45 |
plundra | Yeah. | 10:45 |
plundra | (But I do think a man-page would be a good thing... :-P Not just for initctl/start/stop/whatnot) | 10:45 |
mbiebl | plundra: there is a wiki | 10:46 |
plundra | That really bugs me, more often then not, random linux-projects are awesome, but the lack of documentation makes it unusable. | 10:46 |
mbiebl | so if you want to contribute | 10:46 |
mbiebl | that is a great start | 10:46 |
plundra | Wikis are for faqs and examples, you shouldn't have to use them for basic configuration-syntax etc. :) | 10:47 |
plundra | But that's just me, and I'm to lazy to contribute right now so I'll stop complaining :-D Just wanted to say it. | 10:47 |
plundra | Also, lunch! And thanks for your help. | 10:48 |
mbiebl | plundra: yeah, the man pages could definitely be improved | 10:48 |
mbiebl | but take a look at the home page http://upstart.ubuntu.com/ | 10:48 |
mbiebl | especially scotts blog posts (linked on the front page) and the wiki | 10:48 |
plundra | After respawning too fast, will it try again later or do I manually have to start it again? | 11:52 |
plundra | Doesn't seem like it :-) So, is it possible to have a script runt WHEN it's stopped completly due to respawning too fast? | 11:55 |
plundra | For informing/whatever that it's the case. | 11:56 |
plundra | I know a respawn will emit a start/stop, and nothing special, but is there something that is emitted on respawning too fast? | 11:56 |
mbiebl | plundra: not sure, you can check with "initctl events" what events get emitted by upstart | 11:57 |
plundra | Ah, great :-) "stopped xxxx failed respawn" | 11:59 |
plundra | Hmm, can't get my "on xxxx/failed" (with and without respawn afterwards) to work. | 12:09 |
plundra | Ah! | 12:46 |
plundra | "on stopped xxxx failed" did the trick :) | 12:47 |
plundra | All though, I'd rather have that kind of stuff inside the xxxx-file it self. | 12:48 |
plundra | But on the other hand, now I can create a generic script I guess. That's probably better \o/ I bet you can get 'xxxx' as a parameter or variable somewhere 8-) *searches the wiki* | 12:49 |
plundra | Maybe not. I think I'm getting a UPSTART_EVENT=stopped, and nothing else. | 12:57 |
johnflux | Hey all | 17:57 |
johnflux | How's upstart coming along? | 17:57 |
johnflux | on your webpage, I've noticed that dbus communication is now working? | 17:58 |
johnflux | Does this mean that I can find out, as a normal user, what services are running? | 17:58 |
mbiebl | johnflux: yes | 18:25 |
mbiebl | needs some tweaking, though | 18:26 |
Tv | So... I'd like to migrate from runit to upstart, but I'd like to retain the benefits of easy logging of stdout/stderr.. is there anything nice in upstart for that? | 20:28 |
Tv | i mean, i can make my logging library use syslog, but 1) syslog sucks 2) i'd like to separate the logs from different daemons better 3) i want to capture stdout/stderr to see bugs etc | 20:29 |
sadmac | Tv: do the syslog migration and use a better system logger :) | 20:31 |
sadmac | Tv: rsyslog seems pretty powerful | 20:31 |
Tv | sadmac: doesn't fix the "something writes to stderr" part of the equation | 20:31 |
sadmac | Tv: the problem we've had with that is that if whatever application which is reading/marshalling the stdout/stderr data gets killed, it takes all the applications it was watching with it (massive SIGPIPE) | 20:32 |
Tv | sadmac: yeah that's why daemontools/runit puts a more reliable process in between | 20:33 |
sadmac | Tv: its not reliability per se. It could be a deliberate kill, such as during shutdown. | 20:34 |
Tv | restarting the logger part is perfectly normal for the runsv/svlogd combo | 20:34 |
sadmac | yes, but that's a different kind of connection | 20:35 |
Tv | well yes and it's the thing keeping me using runit | 20:36 |
Tv | about twice a year i try to migrate away, and there's just nothing better.. | 20:36 |
sadmac | Tv: then keep using runit :) | 20:37 |
* sadmac has no desire to dominate the planet | 20:37 | |
Tv | i wanted to have instance jobs | 20:37 |
Tv | oh well | 20:37 |
sadmac | its a problem we've looked at a lot, and for what upstart does, none of the solutions we've found are quite right. But we'll get there | 20:38 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!