/srv/irclogs.ubuntu.com/2011/09/20/#upstart.txt

=== robins is now known as robinsmidsrod
bencchow can I check in a script if an upstart job is running?18:50
JanCbencc: you can parse the output of "initctl status", or use dbus?19:32
benccJanC: I think this will work: if [ status myjob | grep -q 'start/running' ]; then19:33
JanCtechnically it's still running when the status is 'stop/running' too  ;)19:35
JanCbut not for long (if everything goes well)19:36
benccJanC: it will be useful to have a simple command that gives you 0/120:50
JanCbencc: the "X/Y" part is "target/status", so the part after the "/" is the current status20:53
JanCbut yeah, maybe a more script-friendly initctl command might be useful  ☺20:54
nickradfordHow do you write a script that will allow any user to start the service without using sudo?21:51
JanCnickradford: sudo was specifically designed to allow that, why don't you want to use it?22:03
nickradfordI'm trying to have a service which runs a node.js web application, and `start myservice` will be called remotely over ssh, but users which don't know the account they're accessing's password.22:05
JanCyou can configure sudo to allow specific users to run specific commands as root without a password22:06
JanCsee sudo's manpage & other documentation22:07
nickradfordalright, thank you JanC :)22:07
JanCnickradford: there might be more support for such things in future versions of upstart, I don't know, but i'm pretty sure sudo can already do what you want  ;)22:08

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