netsnmp: add missing reload of snmptrapd in init script
authoruniverse II <universeii@gmx.de>
Thu, 25 Feb 2016 21:24:43 +0000 (22:24 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 1 Jul 2016 12:49:24 +0000 (14:49 +0200)
In case of a reload command the snmpdtrapd wasn't restarted.

Signed-off-by: Andreas Ehmanns <universeII@gmx.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/netsnmp/S59snmpd

index 2762082476c78f59de249c59d599dcb4dd082a4f..2d076e0eab67d3bbd0853f758bf26f47ce61a54b 100755 (executable)
@@ -65,6 +65,11 @@ reload() {
         start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
         printf " snmpd"
     fi
+
+    if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
+        start-stop-daemon -q -K -s 1 -p /var/run/snmptrapd.pid -x /usr/sbin/snmptrapd
+        printf " snmptrapd"
+    fi
     echo "."
 }