Your script is tested on my Tinker Board 2s and it's proved to be effective to setup the correct MAX and MIN for that (instead of that a little aggressive settings by the official armbian image), especially for the hardware with only passive cooling that is placed into a wiring box.
And it should be considered to share over github or somewhere since other guys might need this too.
Thanks anyway, sir.