=== DingoSaar_ is now known as DingoSaar [16:13] can I get some help writing a service file? I'm trying to use a pre-stop script to have upstart gracefully kill my program by sending input to a screen session, like this http://unix.stackexchange.com/questions/13953/sending-text-input-to-a-detached-screen [16:13] but it just... doesn't feel like running my pre-stop script, it seems [16:16] ah... it was just killing the process immediately after starting the pre-stop script, without waiting for it to run [16:23] that doesn't sound right? [16:35] JanC: I dunno, but when I added "sleep 1" to the pre-stop script, it seems to work [16:37] eh, if it didn't wait for the pre-stop script to finish that wouldn't help? [16:37] hmm, you're right [16:38] well, the first command in the pre-stop script uses screen -- maybe it forks and upstart doesn't notice? [16:38] take a look : https://github.com/haptics-nri/nri/blob/master/nri.conf [16:40] screen is already running in the background, I assume, so you would have to wait for whatever you are doing in screen to end [16:41] that's correct, the pre-stop sends the quit command to the program running in screen [16:41] so that it doesn't get killed by SIGTERM [16:41] (because it's written in Rust which doesn't support signal handlers yet :( ) [16:41] is there a better way to wait for that exit than "sleep 1"? [16:50] is there any (good) reason why you _need_ to run this inside screen? [16:55] JanC: I need to be able to connect to the console and interact with the program, if necessary [16:55] it has a CLI [16:55] it has a web server, too, so the CLI shoul never be necessary, but you know... bugs [16:59] anyway, I need to run [16:59] if you have an idea on how to make that service file cleaner, I might be around here later or you can file an issue at that github :) [16:59] thanks for your help!