Fully worked like a charm. Pretty embarrassing lol, but yup that's all it was, man this was sweet I learned a lot and again you bought me some time on this router...can't thank you enough!You need to remove these 2 lines:
CODE=bash
And
/CODE
And the brackets around them.
These are not part of the script, but tags put by the forum to display some text lines as code.