Przeglądaj źródła

Revert "Changed the target-session of all tmux commands to use exact matching."

This reverts commit 14efacbdaca024630331468164fe57097cb46497.
Casper 8 lat temu
rodzic
commit
8faffe4ab8

+ 1 - 1
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 1
-	tmux attach-session -t "=${servicename}"
+	tmux attach-session -t ${servicename}
 	fn_print_ok_nl "Closing console"
 	fn_script_log_pass "Console closed"
 else

+ 2 - 2
lgsm/functions/command_start.sh

@@ -110,7 +110,7 @@ fn_start_tmux(){
 		fn_script_log "Tmux version: master (user compiled)"
 		echo "Tmux version: master (user compiled)" >> "${consolelog}"
 		if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then
-			tmux pipe-pane -o -t "=${servicename}" "exec cat >> '${consolelog}'"
+			tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'"
 		fi
 	elif [ -n "${tmuxversion}" ]; then
 		# Get the digit version of tmux
@@ -128,7 +128,7 @@ fn_start_tmux(){
 			Currently installed: $(tmux -V)" > "${consolelog}"
 		# Console logging enable or not set
 		elif [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then
-			tmux pipe-pane -o -t "=${servicename}" "exec cat >> '${consolelog}'"
+			tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'"
 		fi
 	else
 		echo "Unable to detect tmux version" >> "${consolelog}"

+ 4 - 4
lgsm/functions/command_stop.sh

@@ -14,7 +14,7 @@ fn_stop_graceful_ctrlc(){
 	fn_print_dots "Graceful: CTRL+c"
 	fn_script_log_info "Graceful: CTRL+c"
 	# sends quit
-	tmux send-keys C-c -t "=${servicename}" > /dev/null 2>&1
+	tmux send-keys C-c -t "${servicename}" > /dev/null 2>&1
 	# waits up to 30 seconds giving the server time to shutdown gracefuly
 	for seconds in {1..30}; do
 		check_status.sh
@@ -44,7 +44,7 @@ fn_stop_graceful_cmd(){
 	fn_print_dots "Graceful: sending \"${1}\""
 	fn_script_log_info "Graceful: sending \"${1}\""
 	# sends specific stop command
-	tmux send -t "=${servicename}" ${1} ENTER > /dev/null 2>&1
+	tmux send -t "${servicename}" ${1} ENTER > /dev/null 2>&1
 	# waits up to given seconds giving the server time to shutdown gracefully
 	for ((seconds=1; seconds<=${2}; seconds++)); do
 		check_status.sh
@@ -75,7 +75,7 @@ fn_stop_graceful_goldsource(){
 	fn_print_dots "Graceful: sending \"quit\""
 	fn_script_log_info "Graceful: sending \"quit\""
 	# sends quit
-	tmux send -t "=${servicename}" quit ENTER > /dev/null 2>&1
+	tmux send -t "${servicename}" quit ENTER > /dev/null 2>&1
 	# waits 3 seconds as goldsource servers restart with the quit command
 	for seconds in {1..3}; do
 		sleep 1
@@ -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