From e2874320fc027f7ab51ab3e115d5b1889b8fd747 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Mon, 13 Apr 2020 08:39:52 -0400 Subject: Revert changes since v1.21 in pereparation for hotfix release. --- collectors/charts.d.plugin/libreswan/libreswan.chart.sh | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'collectors/charts.d.plugin/libreswan') diff --git a/collectors/charts.d.plugin/libreswan/libreswan.chart.sh b/collectors/charts.d.plugin/libreswan/libreswan.chart.sh index 1320983a53..3d0d3e3f7d 100644 --- a/collectors/charts.d.plugin/libreswan/libreswan.chart.sh +++ b/collectors/charts.d.plugin/libreswan/libreswan.chart.sh @@ -37,16 +37,6 @@ declare -A libreswan_established_add_time=() # we need this to avoid converting tunnel names to chart IDs on every iteration declare -A libreswan_tunnel_charts=() -is_able_sudo_ipsec() { - if ! sudo -n -l "${IPSEC_CMD}" whack --status > /dev/null 2>&1; then - return 1 - fi - if ! sudo -n -l "${IPSEC_CMD}" whack --trafficstatus > /dev/null 2>&1; then - return 1 - fi - return 0 -} - # run the ipsec command libreswan_ipsec() { if [ ${libreswan_sudo} -ne 0 ]; then @@ -102,11 +92,6 @@ libreswan_check() { return 1 fi - if [ ${libreswan_sudo} -ne 0 ] && ! is_able_sudo_ipsec; then - error "not enough permissions to execute ipsec with sudo. Disabling Libreswan plugin." - return 1 - fi - # check that we can collect data libreswan_get || return 1 -- cgit v1.2.3