From 79a6b8a9e04bce3b82cae4fe0e97a7cd8ed18965 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Thu, 12 May 2016 22:29:17 +0100 Subject: [PATCH] updated test --- tests/tests_ts3server.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 93f0fa890..382a9f9be 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -109,22 +109,21 @@ fn_runfunction core_functions.sh fn_currentstatus_tmux(){ -pid=$(tmux list-sessions 2>&1 | awk '{print $1}' | grep -Ec "^${servicename}:") -if [ "${pid}" != "0" ]; then - currentstatus="ONLINE" -else - currentstatus="OFFLINE" -fi + check_status.sh + if [ "${status}" != "0" ]; then + currentstatus="ONLINE" + else + currentstatus="OFFLINE" + fi } fn_currentstatus_ts3(){ -ts3status=$(${executable} status servercfgfullpathfile=${servercfgfullpath}) - -if [ "${ts3status}" == "Server is running" ]; then - currentstatus="ONLINE" -else - currentstatus="OFFLINE" -fi +check_status.sh + if [ "${status}" != "0" ]; then + currentstatus="ONLINE" + else + currentstatus="OFFLINE" + fi } fn_setstatus(){