From bbcea8b78094eb74c07f80a6124a5d2342327815 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Sat, 7 May 2022 12:37:19 +0000 Subject: [PATCH] Don't rely on the pid-file to see if snmpd is running or not. --- test/lib.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lib.sh b/test/lib.sh index 9eba5f77..b6512458 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -213,7 +213,8 @@ fi if $SNMPCHECK; then if [ "${WITH_NETSNMP}" == "yes" ]; then - if [ ! -f /run/snmpd.pid ]; then + pgrep snmpd > /dev/null + if [ $? != 0 ]; then echo -e "\e[31m\nenable-netsnmp set but snmpd not running, start with:" echo "systemctl start snmpd" echo ""