ericsysmin | if I have an upstart script, and i want it to stop respawn when i do a initctl stop <service> what should I change? | 01:22 |
---|---|---|
ericsysmin | it correctly on failing restarts itself, but when running a stop, it still restarts itself | 01:23 |
ericsysmin | is this something I should use a PID for? | 01:23 |
JanC | it should not restart when you use stop | 01:28 |
JanC | maybe it crashes when you try to stop it or something? | 01:28 |
JanC | or something else restarts it? | 01:29 |
ericsysmin | give me a few removing the respawn value to see if it works without respawn in the file | 01:31 |
ericsysmin | when i remove respawn, it stops as it should | 01:32 |
ericsysmin | and stays stopped, so it's definitely having respawn in the service | 01:33 |
ericsysmin | that causes it | 01:33 |
JanC | do you have a pre-stop script or something like that? | 01:34 |
ericsysmin | yea | 01:34 |
ericsysmin | i do have a pre-stop script which does cleanup if you "stop" the service | 01:35 |
JanC | most likely something goes wrong in there | 01:35 |
JanC | something that returns a non-zero exit status | 01:36 |
JanC | at least, that's my guess | 01:36 |
ericsysmin | ah ok | 01:39 |
JanC | remember all scripts in upstart are run with "sh -e" | 01:39 |
ericsysmin | nothing exiting with non-zero | 01:49 |
JanC | are you sure it's okay to clean up _before_ stopping the service? | 01:52 |
JanC | some services might crash if you try that (clean up in post-stop script then) | 01:52 |
ericsysmin | omg lol dur, that is probably it | 01:53 |
JanC | "cleaning up" is more or less what post-stop is for usually :) | 01:54 |
ericsysmin | typo on my part | 01:55 |
JanC | while pre-stop is often used to stop the service process if that requires a special command | 01:55 |
JanC | or sometimes to cancel the stop | 01:56 |
ericsysmin | yea, it's a post-stop style script | 02:05 |
ericsysmin | it would most definitely break it if running | 02:06 |
ericsysmin | JanC, thanks for your help man | 02:51 |
=== JanC is now known as Guest38161 | ||
=== JanC_ is now known as JanC | ||
ericsysmin | how would i create a list of vars that are used throughout my upstart file? | 23:46 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!