postinst 398 B

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