[02:45] Hi there, is it a bad idea to use upstart on centos? [02:56] Hello? [03:58] hey all, got an issue trying to create a custom upstart job that I'm hoping is me missing something obvious [03:59] have tried using both exec and script to call a command that is passed an option of another file to launch, no short or long opts form before it, but get the result of "no such file or directory" despite both referenced files being present [03:59] job can be seen at https://gist.github.com/deserted/704c1ca5e0a2bbc40cd6 along with the output error [03:59] any help would be greatly appreciated :) [04:25] deserted: the error message in your gist looks like its coming from a sysv init script [04:26] line 24 in the upstart init script is the respawn limit [04:28] detrout, ahh thanks, think you're spot on, as there's a /etc/init.d/casualbookings initscript as well :S [04:28] you probably need a guard condition in the init script [04:29] detrout, just tried removing the casualbookings sysv script, which flagged that casual-bookings.conf doesn't seem to be recognised as a service [04:30] ~# service casual-bookings [04:30] casual-bookings: unrecognized service [04:30] initctl reload-configuration? [04:30] done right before the paste sorry [04:31] (warning i don't know that much about upstart [04:31] i came here because I had a bug in someone elses upstart init script [04:31] no prob lol, you've already fixed one issue for me :) [04:31] :) [04:32] I think initctl is the control utility for upstart [04:32] there's probably something in its man page that's useful [04:32] for your situation [04:33] yeah it is, but initctl check-config isn't flagging any issues with the job config [04:33] so little confused as to why not wworking lol [04:33] my guess is that the system started with the sysv version and I was thinking maybe its still expecting to use the sysv version? [04:34] all good, cheers for the help, sysv version hasn't been used at all, was also only installed this boot, but i'm trying to replace it rather then go live with the old functionality [04:34] ah ok [04:34] even though tab-complete not working, querying as full string is, so I'll keep going from here :) [04:34] # service casual-bookings status [04:34] casual-bookings stop/waiting [04:35] looks like may be getting the same issue as the sysv though, where it's treating the cmd + options as a single cmd string [04:36] hm thats weird [04:37] the docs seem to think thats ok [06:15] detrout, got it sorted in the end, thanks to debug logging [06:15] setuid won't accept an env variable [15:09] Thoughts on why this starts my script five times? I presume because of the respawn line, but what do I need to do to get this thing to realize it already started the script? https://gist.github.com/jjshoe/1d795c7169be2cb30388 [15:14] Why do you use start-stop-daemon? [15:15] Instead of the script block, try: exec /usr/bin/monitor.rb [15:15] You should have the output in /var/log/upstart/{jobname}.log automatically. [15:18] Also, remove the instance line. [15:21] ion, same bahvior. [15:22] I wind up with six pid's. [15:22] Does monitor.rb daemonize? [15:22] Can you make it not daemonize? [15:22] ion, nope, runs in a while loop. [15:22] Do you see errors in syslog or /var/log/upstart/{jobname}.log? [15:23] ion, no file is created there. [15:24] Please pastebin the current job definition [15:25] https://gist.github.com/jjshoe/982cf227aae470234f6b [15:27] calling monitor.rb as root causes it to work correctly, it happily loops away. [15:33] ion, any thoughts? [15:50] Is there some output regarding the job in syslog? [16:03] Having some issues starting a jar daemon, service xxx start seems to just hang (process starts but doesn't go back to cmdline) [16:03] Using as a template http://blog.jineshmk.in/2013/09/running-jar-as-service-using-upstart.html === broder_ is now known as broder [22:01] refactoring is fun, when one has a fully passing test-suite \o/ =)