Android TV autostart script
You could go with automation to accomplish this. 

There are several candidates for this e.g Macrodroid (free up to 5 macros) , Tasker (free 7 day trial) etc (but I am an intermediate user of the the latter hence prefer it)

Profile (or Trigger)

Create a Profile which allows triggering of the Task after boot:


Go to Profiles Tab and click the "+"
Event ➡  System ➡  Device Boot
Tap back to exit from this window


Task

You will notice as soon exit, you will be prompted to link this to a Task


Scroll all the way up the Task list select "New Task + "
You can name this Task anything (optional).
Click "+" to add new Action
Code ➡ Run Shell [ Command (enter script command) , Tick "Use Root" if it needs root]
Tap back to exit from this task


Explanation: Soon after boot, your predefined script will be executed by Tasker