Don't rely on the pid-file to see if snmpd is running or not.
This commit is contained in:
parent
3bb681ffe2
commit
bbcea8b780
1 changed files with 2 additions and 1 deletions
|
|
@ -213,7 +213,8 @@ fi
|
||||||
|
|
||||||
if $SNMPCHECK; then
|
if $SNMPCHECK; then
|
||||||
if [ "${WITH_NETSNMP}" == "yes" ]; 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 -e "\e[31m\nenable-netsnmp set but snmpd not running, start with:"
|
||||||
echo "systemctl start snmpd"
|
echo "systemctl start snmpd"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue