[11:12] <gianluca_r> hello all
[11:15] <gianluca_r> i'm using Ubuntu9.10 server, putting nginx under upstart, 'start nginx' cmd makes nginx starting and runnig but the job is registered and then unregistered while nginx keeps runnig, when use 'stop nginx' get: "stop: Unknown instance:"
[11:15] <gianluca_r> some hint?
[11:17] <JanC> yep, sounds like it forks more often than upstart expects
[11:18] <JanC> what "expect" line do you have?
[11:19] <gianluca_r> JanC: don't an 'expect' line
[11:20] <JanC> you probably need an "expect daemon" line or such (see "man 5 init")
[11:20] <gianluca_r> ok thnx a lot, try immediatly
[11:21] <gianluca_r> i tried before the with a line only containing 'daemon' it resulted in error
[11:22] <gianluca_r> JanC: yes it's ok now, thnx
[11:23] <gianluca_r> i was reading this: http://upstart.ubuntu.com/wiki/Stanzas and it was clear to me
[11:23] <gianluca_r> is there some other docs about upstart 0.6.3?
[11:25] <gianluca_r> ...and now the 'stop' cmd hangs
[11:25] <JanC> docs --> see the manpage I pointed to
[11:25] <gianluca_r> ok thnx
[11:27] <gianluca_r> it stpos it correctly though
[11:40] <gianluca_r> bye all, JanC thanks again
[23:22] <Jaja_> hi
[23:22] <Jaja_> is anyone alive here?
[23:23] <Tartaros> I wonder if it makes sense in the current state of affairs to actually use upstart for definition of my own services/tasks
[23:23] <Tartaros> I mean, is it stable enough/
[23:23] <Tartaros> ?
[23:24] <Tartaros> stable as in api
[23:24] <Tartaros> also there seem to be quite a lack of tutorials/documentations...
[23:24] <mbiebl> man init
[23:25] <mbiebl> regarding the API, are you referring to the job file syntax?
[23:25] <Tartaros> yeah I guess so
[23:26] <mbiebl> afaik it is not set in stone. It won't be before 1.0 is released
[23:26] <JanC> "man 5 init" actually, if you want to see the syntax documentation
[23:26] <ion> I use Upstart for my jobs. The syntax may change in the future, but i’ll just do the changes needed when upgrading to a new distro release.
[23:26] <mbiebl> JanC: yes, thanks
[23:27] <ion> 0.10/1.0/whatever may implement backwards compatibility for 0.6 jobs, though.
[23:27] <Tartaros> well as of current state, do I understand correctly that basically all ubuntu services still have their old init.d scripts, which are only used by "placeholder" simple scripts in /etc/init ?
[23:27] <mbiebl> Tartaros: I assume that given Ubuntu uses upstart heavily in 9.10, it will keep compat for 0.6
[23:28] <mbiebl> Tartaros: that is no longer correct since 9.10
[23:28] <ion> The most essential Ubuntu stuff has already migrated to Upstart.
[23:28] <JanC> everything that runs on the default desktop I think
[23:29] <Tartaros> so what'
[23:29] <Tartaros> what's /etc/init.d for?
[23:29] <mbiebl> Tartaros: It's kept for backward compatibility
[23:29] <Tartaros> I mean how is it still so full?
[23:29] <Tartaros> so, is it being used or not?
[23:29] <mbiebl> Tartaros: are you running 9.10?
[23:30] <Tartaros> yes, 9.10
[23:30] <JanC> actually, there are fake sysvinit scripts in there  ;)
[23:30] <mbiebl> most of them are symlinks
[23:30] <mbiebl> check with ls -la
[23:30] <Tartaros> fake? yeah I know but they point somewhere
[23:30] <mbiebl> Tartaros: sys admins are used to type /etc/init.d/<service> <action>
[23:31] <mbiebl> /lib/init/upstart-job is a tiny, simple shell script
[23:31] <Tartaros> so that's all they're for? if you don't type this manually, they're not used?
[23:31] <mbiebl> which basically runs the native upstart jobs
[23:31] <mbiebl> yeah, they are only for sysadmins convenience
[23:31] <Tartaros> oh, ok then
[23:32] <Tartaros> and the "service" command is upstart based or initv based?
[23:32] <mbiebl> Better check /etc/rc?.d/
[23:32] <mbiebl> symlinks in there point to services that are still sysv
[23:33] <mbiebl> rcS.d and rc2.d are pretty nowadays on a default Ubuntu desktop install 
[23:33] <mbiebl> pretty empty, i.e.
[23:33] <ion> The service command it designed as the proper way to call sysvinit scripts.
[23:33] <ion> is
[23:34] <Tartaros> aso for upstart one should use initctl right?
[23:34] <ion> Or the symlinks to it, such as start, stop and restart.
[23:35] <Tartaros> yeah
[23:35] <Tartaros> ok
[23:35] <Tartaros> as for creating a service - all one is supposed to do is adding a new myjob.conf file in /etc/init, right?
[23:36] <Tartaros> and also, is there a way to list events that are in use?
[23:37] <Tartaros> say I want to run something "when network is on" but I don't know what even(s) that means... where do I look?
[23:37] <ion> /etc/init, yes. As a personal preference, i put my local jobs under /etc/init/local/ for easy access.
[23:37] <mbiebl> Tartaros: grep for "emit"
[23:38] <mbiebl> emits, actually
[23:38] <mbiebl> in /etc/init
[23:38] <mbiebl> this list is not exhaustive though
[23:38] <Tartaros> there are "inbuilt" events?
[23:39] <Tartaros> where are they liste
[23:39] <Tartaros> d?
[23:39] <ion> Upstart’s internal events are documented in init(5). Some of the events emitted by jobs are documented under /etc/init as mbiebl mentioned. ifupdown installs the script /etc/network/if-up.d/upstart, which emits the net-device-up event.
[23:41] <Tartaros> cool
[23:44] <Tartaros> one last thing :)
[23:44] <Tartaros> when I want something to be run as a specified user, is there some sort of support for that?
[23:44] <ion> For now, use su.
[23:44] <Tartaros> or do I just do se
[23:44] <Tartaros> su
[23:44] <Tartaros> yeah
[23:44] <Tartaros> ok
[23:45] <Tartaros> thanks :)
[23:45] <ion> PAM sessions support is in TODO, but not implemented yet.
[23:45] <Tartaros> so without su, it's run as root right?
[23:47] <ion> Yes
[23:47] <Tartaros> ok
[23:47] <Tartaros> thanks for all the info :)