From c64d1dac745a9b20f8bf2322d0c9e8d2185f6029 Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 15 Apr 2018 17:12:32 +0200 Subject: [PATCH 1/2] Properly attach tmux session --- lgsm/functions/command_console.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 8feed5bb6..e7d9a6ac9 100644 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -30,7 +30,7 @@ if [ "${status}" != "0" ]; then fn_print_ok_nl "Accessing console" fn_script_log_pass "Console accessed" sleep 0.5 - tmux attach-session -t="${servicename}" + tmux attach-session -t "${servicename}" fn_print_ok_nl "Closing console" fn_script_log_pass "Console closed" else From 5e1dcdab17d15b8b941db2b82a9c18f1e2766b7b Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Sun, 15 Apr 2018 23:31:06 +0200 Subject: [PATCH 2/2] -t= won't work with some tmux versions --- lgsm/functions/command_stop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index cc9ea471b..24223974e 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -263,7 +263,7 @@ fn_stop_tmux(){ fn_script_log_info "tmux kill-session: ${servername}" sleep 0.5 # Kill tmux session - tmux kill-session -t="${servicename}" > /dev/null 2>&1 + tmux kill-session -t "${servicename}" > /dev/null 2>&1 sleep 0.5 check_status.sh if [ "${status}" == "0" ]; then