[18:50] <bencc> how can I check in a script if an upstart job is running?
[19:32] <JanC> bencc: you can parse the output of "initctl status", or use dbus?
[19:33] <bencc> JanC: I think this will work: if [ status myjob | grep -q 'start/running' ]; then
[19:35] <JanC> technically it's still running when the status is 'stop/running' too  ;)
[19:36] <JanC> but not for long (if everything goes well)
[20:50] <bencc> JanC: it will be useful to have a simple command that gives you 0/1
[20:53] <JanC> bencc: the "X/Y" part is "target/status", so the part after the "/" is the current status
[20:54] <JanC> but yeah, maybe a more script-friendly initctl command might be useful  ☺
[21:51] <nickradford> How do you write a script that will allow any user to start the service without using sudo?
[22:03] <JanC> nickradford: sudo was specifically designed to allow that, why don't you want to use it?
[22:05] <nickradford> I'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:06] <JanC> you can configure sudo to allow specific users to run specific commands as root without a password
[22:07] <JanC> see sudo's manpage & other documentation
[22:07] <nickradford> alright, thank you JanC :)
[22:08] <JanC> nickradford: 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  ;)