check that the ipsec command is libreswan; fixes #3221
Costa Tsaousis (ktsaou) committed
Jan 4, 2018 at 12:57 UTC
a8c29802e289edf719eb2d8e584f145b15fa60b3
1 file changed
+7
charts.d/libreswan.chart.sh
+7
@@ -84,6 +84,13 @@ libreswan_check() {
84
85
require_cmd ipsec || return 1
86
87
+ # make sure it is libreswan
88
+ if [ -z "$(ipsec --version | grep -i libreswan)" ]
89
+ then
90
+ error "ipsec command is not Libreswan. Disabling Libreswan plugin."
91
+ return 1
92
+ fi
93
+
94
# check that we can collect data
95
libreswan_get || return 1
96