0

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

  • At that point it is not a remapping that you want, but a rewiring, at least for the reset button. – xenoid Jun 09 '19 at 12:51
  • For the Power button, see https://superuser.com/questions/699905/change-behavior-of-linux-power-button – xenoid Jun 09 '19 at 12:53
  • Hi, none of these really work. That link is to turn off the power button. – brandontaz2k2 Jun 10 '19 at 00:37
  • That link also tells you how to find the script that is executed when you hit the power button, and therefore how to replace it by another script that unmounts drives. – xenoid Jun 10 '19 at 10:03

0 Answers0