postinst 380 B

123456789101112131415
  1. #!/bin/sh
  2. set -e
  3. case "$1" in
  4. configure|reconfigure)
  5. chown root:netdata /usr/libexec/netdata/plugins.d/slabinfo.plugin
  6. chmod 0750 /usr/libexec/netdata/plugins.d/slabinfo.plugin
  7. if ! setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/slabinfo.plugin; then
  8. chmod -f 4750 /usr/libexec/netdata/plugins.d/slabinfo.plugin
  9. fi
  10. ;;
  11. esac
  12. exit 0