From a34663febf0e1faa5ba768c95a1e140b35b27afd Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 16 Oct 2015 16:07:13 -0400 Subject: [PATCH] Added graceful stop when possible. Should work on source servers and gold source servers. If the server also has a quit command outside those then this should do it also. --- functions/fn_stop | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions/fn_stop b/functions/fn_stop index 08b886344..72a5aa13c 100644 --- a/functions/fn_stop +++ b/functions/fn_stop @@ -124,6 +124,8 @@ else fn_printfail "${servername} is already stopped" fn_scriptlog "${servername} is already stopped" else + tmux send -t "${servicename}" quit ENTER + sleep 20 tmux kill-session -t "${servicename}" fn_printok "${servername}" fn_scriptlog "Stopped ${servername}"