From a2a853be927de72bf582efb8da256159f5aeaf68 Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Tue, 10 Oct 2017 23:06:21 +0200 Subject: Prepare the nogfx variant of the service check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and enhance verbosity. Change-Id: Ia95a6236ffc4229703714ad58b70b21c00884c5c Signed-off-by: Jan-Simon Möller --- common/scripts/service-check-gfx.sh | 25 +++++++++++++++++++++++++ common/scripts/service-check-nogfx.sh | 25 +++++++++++++++++++++++++ common/scripts/service-check.sh | 22 ---------------------- 3 files changed, 50 insertions(+), 22 deletions(-) create mode 100755 common/scripts/service-check-gfx.sh create mode 100755 common/scripts/service-check-nogfx.sh delete mode 100755 common/scripts/service-check.sh (limited to 'common') diff --git a/common/scripts/service-check-gfx.sh b/common/scripts/service-check-gfx.sh new file mode 100755 index 0000000..2a5353b --- /dev/null +++ b/common/scripts/service-check-gfx.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +REQUIREDSOCKETS="cynara.socket dbus.socket security-manager.socket" +REQUIREDSERVICES="afm-system-daemon.service afm-user-daemon.service connman.service ofono.service weston.service HomeScreen.service lightmediascanner.service bluetooth.service" + +ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}" +RESULT="unknown" + +for i in ${ALL} ; do + echo -e "\n########## Test for service ${i} being active ##########\n" + systemctl is-active ${i} >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + RESULT="pass" + else + RESULT="fail" + fi + lava-test-case ${i} --result ${RESULT} + + if [ x"fail" == x"${RESULT}" ] ; then + systemctl status ${i} || true + fi + echo -e "\n########## Result for service ${i} : $RESULT ##########\n" +done + +exit 0 \ No newline at end of file diff --git a/common/scripts/service-check-nogfx.sh b/common/scripts/service-check-nogfx.sh new file mode 100755 index 0000000..62d1b3d --- /dev/null +++ b/common/scripts/service-check-nogfx.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +REQUIREDSOCKETS="cynara.socket security-manager.socket" +REQUIREDSERVICES="afm-system-daemon.service afm-user-daemon.service connman.service" + +ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}" +RESULT="unknown" + +for i in ${ALL} ; do + echo -e "\n########## Test for service ${i} being active ##########\n" + systemctl is-active ${i} >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + RESULT="pass" + else + RESULT="fail" + fi + lava-test-case ${i} --result ${RESULT} + + if [ x"fail" == x"${RESULT}" ] ; then + systemctl status ${i} || true + fi + echo -e "\n########## Result for service ${i} : $RESULT ##########\n" +done + +exit 0 \ No newline at end of file diff --git a/common/scripts/service-check.sh b/common/scripts/service-check.sh deleted file mode 100755 index 4dc0a25..0000000 --- a/common/scripts/service-check.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -REQUIREDSOCKETS="cynara.socket dbus.socket security-manager.socket" -REQUIREDSERVICES="afm-system-daemon.service afm-user-daemon.service connman.service ofono.service weston.service HomeScreen.service lightmediascanner.service bluetooth.service" - -ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}" -RESULT="unknown" - -for i in ${ALL} ; do - echo "########## Test for service ${i} being active ##########" - systemctl is-active ${i} >/dev/null 2>&1 - if [ $? -eq 0 ] ; then - RESULT="pass" - else - systemctl status ${i} || true - RESULT="fail" - fi - echo "########## Result for service ${i} : $RESULT ##########" - lava-test-case ${i} --result ${RESULT} -done - -exit 0 \ No newline at end of file -- cgit 1.2.3-korg