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