postinst 433 B

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