postinst 479 B

123456789101112131415161718
  1. #!/bin/sh
  2. set -e
  3. case "$1" in
  4. configure|reconfigure)
  5. chown root:netdata /usr/libexec/netdata/plugins.d/perf.plugin
  6. chmod 0750 /usr/libexec/netdata/plugins.d/perf.plugin
  7. if ! setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin 2>/dev/null; then
  8. if ! setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin 2>/dev/null; then
  9. chmod -f 4750 /usr/libexec/netdata/plugins.d/perf.plugin
  10. fi
  11. fi
  12. ;;
  13. esac
  14. exit 0