diff options
Diffstat (limited to 'common/scripts/service-check-nogfx.sh')
-rwxr-xr-x | common/scripts/service-check-nogfx.sh | 25 |
1 files changed, 25 insertions, 0 deletions
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 |