Execute a script after suspend in Ubuntu 16.04

Sometimes you need to execute a script when your computer is recovering from suspend. Usually, as it is my case, this is necessary to fix some hardware that is not waking up properly.

Happily, this is a very easy task. You just have to add a script to the directory   and it will be executed when going to or from suspend.

In my case, the script is as follows:

 

The "post" option in the case is for when the computer is waking up. If you need to execute something when going to sleep use "pre".

Comentarios

I had the exactly same problem with my fans!

Thanks!

Añadir nuevo comentario

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.