Fix capsh logic

This commit is contained in:
TheSpad 2022-12-07 22:01:24 +00:00
parent 8d50b4f4f4
commit aba0bd6904
No known key found for this signature in database
GPG Key ID: 08F06191F4587860

View File

@ -8,7 +8,7 @@ ip link del dev test 2>/dev/null
if ip link add dev test type wireguard; then
echo "**** It seems the wireguard module is already active. Skipping kernel header install and module compilation. ****"
ip link del dev test
if capsh --print | grep -qv '\!cap_sys_module'; then
if capsh --current | grep "Current:" | grep "cap_sys_module"; then
echo "**** As the wireguard module is already active you can remove the SYS_MODULE capability from your container run/compose. ****"
fi
else