[17:12] <IOMonster> Hello all! Quick question about pre-stop scripts - is there a way to tell Upstart to not restart an app if it closes while the pre-stop script is running?
[17:13] <IOMonster> as part of my pre-stop script i have to send a kill signal to the process upstart is supervising, and upstart sees the application end and restarts it
[17:14] <IOMonster> (i'm using upstart 0.6.5, and trying to work around an issue where runuser only gives my application 2 seconds to clean up before it gets SIGKILL'd)
[17:14] <IOMonster> so my pre-stop script sends a SIGTERM to the process upstart is supervising and waits for it to clean up
[17:25] <IOMonster> y'know, nevermind. i just realized that i should be using "expect fork" so upstart doesn't track runuser's pid
[17:25] <IOMonster> sometimes, the simple solution is the one you don't think of until you've done something the hard way :)
[17:59] <AnrDaemon> IOMonster: I'm afraid it's a problem in your version.
[18:00] <AnrDaemon> IOMonster: Also, if it is at all possible, don't run your applications in forking mode under supervising init daemons.
[18:11] <IOMonster> AnrDaemon: indeed, the application isn't actually forking
[18:11] <IOMonster> the script section does "exec runuser <blah>"
[18:11] <AnrDaemon> WTF
[18:11] <AnrDaemon> WHY?
 doesn't fork, it runs exec java
[18:12] <IOMonster> hm?
[18:12] <AnrDaemon> Just start daemon directly with upstart.
[18:12] <IOMonster> unfortunately
[18:12] <IOMonster> i need to run this as a user other than 'root'
[18:12] <IOMonster> so, runuser is required
[18:12] <AnrDaemon> DO THAT WITH UPSTART
[18:12] <AnrDaemon> runuser is useless.
[18:12] <IOMonster> no need for all caps :)
[18:12] <IOMonster> upstart 0.6.5 doesn't have user options
[18:13] <AnrDaemon> Then upgrade your shit already, it's well over six years.
[18:13] <IOMonster> http://upstart.ubuntu.com/cookbook/#stanzas-by-category
[18:13] <IOMonster> setgid is only 1.4
[18:13] <IOMonster> unfortunately i'm not in control of the init version my OS is using
[18:13] <AnrDaemon> $ init --version
[18:13] <AnrDaemon> init (upstart 1.12.1)
[18:14] <AnrDaemon> And it's a 4 years old version.
[18:14] <AnrDaemon> Then use a different OS.
[18:14] <IOMonster> yep, amazon linux is based off cent5, which is indeed ancient
[18:14] <IOMonster> however
[18:14] <AnrDaemon> LOL
[18:14] <IOMonster> it's what i've QA'd
[18:14] <AnrDaemon> Get a better hosting. Seriosuly.
[18:14] <AnrDaemon> It's beyond stupid.
[18:14] <IOMonster> changing OS just because upstart is ancient in this version isn't an option
[18:15] <IOMonster> this isn't a hobby project
[18:15] <AnrDaemon> The more stupid it sounds.
[18:15] <IOMonster> haha
[18:15] <AnrDaemon> If you are unable to use nromal, quality software, this is just… not sane.
[18:15] <IOMonster> thanks for your input
[18:16] <IOMonster> i am using quality software, it's been QA'd by myself and amazon ec2 engineers
[18:16] <IOMonster> i'm not going to re-QA a whole OS just because i can't use a specific option
[18:16] <IOMonster> if this was my home box, sure, i'd switch to fedora or something more recent
[18:17] <IOMonster> but a full review of all configurations, applications, and even kernel modules would cost me time i don't have
[18:17] <AnrDaemon> You know, what? Nobody is going to help you with extremely outdated, probably insecure versions of software.
[18:17] <IOMonster> ok, i'm trying to be nice here, but seriously why are you so aggressive?
[18:18] <IOMonster> i asked a question, answered it myself and wasn't rude