netdata-plugin-perf.postinst 492 B

1234567891011121314151617181920
  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. #DEBHELPER#
  15. exit 0