=== rberger_ is now known as rberger [13:04] i'm considering migrating an init.d script to upstart. I've looked through the files in /etc/init, but I don't really get what gets run when you stop a service. [13:04] basically, my init.d script sets up a bunch of iptables rules, and when it is stopped, I want to remove them. [13:11] i see some scripts don't have a script or exec, they only have pre-start and post-stop. Maybe that's how I need to do it. [13:11] put them in a post-stop script [13:11] yes [13:11] then your job is "running" when the rules are in place [13:11] Keybuk, ok, cool. [13:11] even though there's no process associated [13:11] that makes sense now. [13:12] in my init.d script, I have another command that I can run: service firewall report [13:12] can I add new "commands" with upstart? [13:13] Keybuk: basically, the report command just does: iptables -nvx -t filter -L ACCOUNTING [13:15] not yet [13:15] it's planned [13:16] Keybuk, ok, thanks [13:30] Keybuk: any reason why I'm not getting any echo output? I've got console output in my firewall.conf file and my pre-start script contains echo "Test", but doing start firewall doesn't respond with "Test" [13:57] oh, I see. Including "console output" makes the output go to the console. duh. But when I remove that, I still don't see the echo output at the command line when I run "start firewall" [14:01] removing that makes the output go to /dev/null [15:39] Keybuk, is there a way to get echos to be output then? Besides to the console or /dev/null? [15:39] no [15:40] i've got my upstart script working perfectly, and am currently doing: echo "Informational message" >> /tmp/firewall.out [15:40] but i would prefer the output to be on stdout. [15:40] ok then. thanks anyway! [15:41] right [15:41] but which stdout? :p [15:42] yeah, i see your point. i mean if someone enters "start firewall" via an ssh session, they should see the output. but i wasn't thinking this would also be run at other times too. === Caesar_ is now known as Caesar === blueyed_ is now known as blueyed [21:39] what's the best way to start a service running as a particular user? [21:40] su [21:41] i mean, i will create a new file /etc/init/jetty.conf, but I want the script that starts jetty to run as a user on the system. === rberger_ is now known as rberger [22:28] Here is my upstart conf file: http://pastie.org/865735 [22:28] when I do a "start jetty", a java process gets started [22:28] and it reports that it is started with a pid [22:28] but "status jetty" says it isn't running [22:29] and "stop jetty" doesn't work [22:29] how can I make this script start jetty as a user, and then be able to stop it by running "/home/$username/jetty/stop.sh" as the user? [22:41] "expect fork" or "expect daemon" === robbiew is now known as robbiew_ [23:26] Keybuk, thanks, i'll try that