Gpio on the GL-AR150

I want to make a push button for my GL-AR150 to safely unmount my USB flash drive before powering it down. I feel like just pulling the plug is eventually going to brick the drive.

Right now, I SSH into the router and execute a script to unmount the drive. I’ve been digging around for 2 days and can’t find a solution. Anything close to what I need utilizes the 3 position switch.

Am I out of luck on this?

Pls check /etc/rc.button folder. You can find scripts which is used for the switch button. You can just try to modify and add your own script.