I would like to use an old raspberry zero 1.3 to share files in my home network, but I wish I could shut down the connected hard drives as the system shuts down.
Initially I thought that it was enough to associate the status of the ACT led to a GPIO pin ( https://forums.raspberrypi.com/viewtopic.php?t=146455#p964587 ), but in case of errors the led will start flashing, then the disks connected could be damaged.
So, using a mosfet, how can I turn off a usb hub if the system is not booted?