summaryrefslogtreecommitdiffstats
path: root/contrib/debian/netdata-plugin-go.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/debian/netdata-plugin-go.postinst')
-rw-r--r--contrib/debian/netdata-plugin-go.postinst5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/debian/netdata-plugin-go.postinst b/contrib/debian/netdata-plugin-go.postinst
index 9cfce16f6..70d67aaa1 100644
--- a/contrib/debian/netdata-plugin-go.postinst
+++ b/contrib/debian/netdata-plugin-go.postinst
@@ -5,7 +5,10 @@ set -e
case "$1" in
configure|reconfigure)
chown root:netdata /usr/libexec/netdata/plugins.d/go.d.plugin
- setcap "cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin
+ chmod 0750 /usr/libexec/netdata/plugins.d/go.d.plugin
+ if ! setcap "cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin; then
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/go.d.plugin
+ fi
;;
esac