Remove extraneous munin plugins on hosts
[invirt/packages/xvm-munin-config.git] / debian / xvm-munin-host-config.postinst
index 890770a..227a982 100755 (executable)
@@ -26,13 +26,15 @@ case "$1" in
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
 
         # Install munin plugins that are now configured
         munin-node-configure --suggest --shell | sh
 
+       # Remove extraneous munin plugins
        (cd /etc/munin/plugins &&
            for i in smart_*; do
                if smartctl -i "/dev/${i#smart_}" | grep Device | grep EQLOGIC; then
                    rm -v "$i";
                fi
            done)
        (cd /etc/munin/plugins &&
            for i in smart_*; do
                if smartctl -i "/dev/${i#smart_}" | grep Device | grep EQLOGIC; then
                    rm -v "$i";
                fi
            done)
-        
+       (shopt -s nullglob; rm -v /etc/munin/plugins/if*_tap* || :)
+
         invoke-rc.d munin-node restart
     ;;
 
         invoke-rc.d munin-node restart
     ;;