I am trying to find a way to change the functionality of the power/reset buttons on the server case for my install of Ubuntu Server 18.04.2.
I am running a Plex server with 2 USB external hard drives powered by USB that frequently need to be unplugged from the server, which requires the drives to be unmounted safely before being unplugged. I should add that the end-user already grasps the concept of "safely unmounting" USB hard drives before unplugging them.
This server will be installed in a living room on a shelf, with easy access to the USB ports and power/reset buttons. I want to change the Reset button to trigger a script to unmount the two drives. The end result needs to be something easy enough that a technology challenged person could do it, which is why I chose the simple 'Press a button on the front, then remove 1 minute later' solution.
I'm not even sure if this is possible, that's why I'm here, any help would be greatly appreciated. Thanks