=== stereoit is now known as stereoit_ === stereoit is now known as stereoit_ [16:02] Upstart doesn't shutdown when SIGTERM is end to /sbin/init [16:02] instead it says [16:03] write(12, "<4>init: Re-executing /sbin/init"..., 33) = 33 [19:41] Has anyone on here tried getting a phoenix app to run using upstart? [19:45] Qantourisc: isn't that what is supposed to happen? [19:45] JanC: not accordig to man page 8 init [19:48] oh, you mean a user upstart? [19:48] I mean a session upstart [19:50] JanC: wait "user upstart" [19:50] why would it start as user-upstart (well i can think of a few reason) [19:50] but what would be required for it to start as such ? [19:50] /sbin/init is started [19:53] * Qantourisc looks for some flags to force session upstart [19:54] Qantourisc: if you are using upstart as system init then SIGTERM should restart it [19:54] (running in lxc btw) [19:54] JanC: so i want non-session :D [19:54] right [19:54] but won't that disable tomany init functions ? [19:54] then again i need verry litle [19:54] and the manpage doesn't say anything but no-session [19:55] about non-session [19:55] networking, maybe some /dev/ nodes, and then services i want [19:55] right [19:55] "--user Starts in user mode, as used for user sessions. Upstart will be run as an unprivileged user," [19:56] JanC: can i still run it as root ? :p [19:56] Qantourisc: if you want to shut down the system, just use the usual tools for that? [19:57] shutdown/halt/reboot ? [19:57] JanC: not an option [19:57] lxc send stuff to /dev/initctl [19:57] (missing) [19:57] and alternatly SIGTERM to /bin/init [19:58] well no console, that doesn't boad well [19:58] well alteast shutdown worked this time :D [19:59] but no more init ! [20:00] --user works with shutdown but start no services (that i can see) [20:00] leave it out, no shutdown [20:01] --user is for user sessions [20:02] JanC: well I have no clue how to shutdown upstart then [20:02] and that's what the SIGTERM in the manpage refers to [20:02] other then a big red-sticker [20:02] FIRST SHUTDOWN LXC SERVER before shuting down LXC host [20:03] O wait [20:03] there is 1 alternati e [20:03] write a small deamon that replaces /dev/initctl [20:03] and pass the requests to init [20:04] why not just use initctl? [20:04] JanC: the app ? [20:05] Or the named-pipe ? [20:05] shutdown, initctl, etc. (they come with upstart for a reason) [20:05] JanC: i'm not running the shutdown [20:05] LXC is [20:06] first it tries /dev/initctl [20:06] then it tries sigterm to /sbin/init [20:07] JanC: you happen to know the interface of /dev/initctl ? :D [20:07] mwea nevermid I can just sniff it, i need to write the api anyway [20:09] hmm this shouldn't be more then 8 lines of python to think of it :D [20:14] it sends 'b'i\x19\t' [20:24] the api is ... weird [20:26] every second it receives a b'' and otherwise it gets a b'\x00' [20:26] first shutdown comand send i \x19 \t \x03 \x01 [20:36] ooow 0x00 mean: connection closed [21:29] JanC: ok got the script ready, took some diffing, uses some weird format, 4 integers, of wich the 3one is actually just int( char() ) [21:29] indicating the desired new-run-level [21:30] * Qantourisc now needs to turn this thing into a deamon [21:35] ok works like a bloody charm [21:50] upstart's init doesn't know what runlevels are... [22:31] JanC: doesn't matter, one just translate the sysintv to the desired action for upstart, as said, works like a charm [22:31] Will have to look into permissions, i tihnk anyone can shutdown the machine now :p [22:32] nope just root, perfect [22:32] * Qantourisc goes to bed