Thanks. This appears to require a reference file/code for it to work.
AB is very flexible in what it writes to jffs. For example, the post-mount may already have existing entware code in it that it respects and uses. But the code added can look entirely different when AB installs entware and adds to the file.
This respectful approach is used on every jffs file. I have no way to know how exactly a jffs file looks like on a router, not even when AB installs all of it.
I just tried your code inline with other scripts.
The function does not work for your situation,
will update if i can find a way