The ufw-docker script will check for a running/healthy ufw-process directly after the __main__remark. It greps the output of the command ufw status (which needs running as root) looking for the string Status: active.
This will only work in English language environments and dies in all other cases.
Being in a German environment $LANG and $LANGUAGE are set to de_DE.UTF-8 which results into Status: Aktiv (please note the small difference active compares to Aktiv when running sudo ufw status.
I solved it temporarily and added export LANGUAGE=en_US.UTF-8 as the second line within your "ufw-docker" script. I did not test for any side effects of my change.
Probably there is a more robust way to check for the real status of ufw.
Thx for your great work with while providing script which solves a common and serious security topic within my local docker setup.
Best regards
Jörg
The ufw-docker script will check for a running/healthy ufw-process directly after the
__main__remark. It greps the output of the commandufw status(which needs running as root) looking for the stringStatus: active.This will only work in English language environments and dies in all other cases.
Being in a German environment
$LANGand$LANGUAGEare set tode_DE.UTF-8which results intoStatus: Aktiv(please note the small differenceactivecompares toAktivwhen runningsudo ufw status.I solved it temporarily and added
export LANGUAGE=en_US.UTF-8as the second line within your "ufw-docker" script. I did not test for any side effects of my change.Probably there is a more robust way to check for the real status of ufw.
Thx for your great work with while providing script which solves a common and serious security topic within my local docker setup.
Best regards
Jörg