If you put it in a folder named "extra" on flash it will be automatically re-installed on boot, no script required. That method isn't discussed a lot these days with all the plugins and dockers we have for additional functionality, but that is how it was done on older versions of Unraid. Any slackware compatible package (.txz .tgz) in the "extra" folder on the flash drive is installed with the installpkg command when Unraid boots.
Use this technique sparingly. It may not be supported and it is easy to get yourself in trouble by installing packages that conflict with other packages installed by your plugins.