Don't rely on the pid-file to see if snmpd is running or not.

This commit is contained in:
Kristofer Hallin 2022-05-07 12:37:19 +00:00 committed by Olof hagsand
parent 3bb681ffe2
commit bbcea8b780

View file

@ -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 ""