Просмотр исходного кода

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.
Andre 10 лет назад
Родитель
Сommit
a34663febf
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      functions/fn_stop

+ 2 - 0
functions/fn_stop

@@ -124,6 +124,8 @@ else
         fn_printfail "${servername} is already stopped"
         fn_printfail "${servername} is already stopped"
         fn_scriptlog "${servername} is already stopped"
         fn_scriptlog "${servername} is already stopped"
     else
     else
+        tmux send -t "${servicename}" quit ENTER
+        sleep 20
         tmux kill-session -t "${servicename}"
         tmux kill-session -t "${servicename}"
         fn_printok "${servername}"
         fn_printok "${servername}"
         fn_scriptlog "Stopped ${servername}"
         fn_scriptlog "Stopped ${servername}"