Startup and Shutdown Order

I’ve recently found DietPi, and used it to setup a MediaServer\Player using a 4Gb Pi4 with a RockPi Quad Sata Hat, and 4x1Tb SSD

System it working well, except on shutdown (and possibly on startup) processes are shutting down in a unhelpful order.

On shutdown, the RockPi software that controls the SSDs is shut down before either unmounting the Mdadm raid or Sonarr has finished shutting down. Can anyone point me in the right direction to re-order these.??

Thanks