Quando o seu sistema "acorda" (Recupera da Suspensão ou Hibernação), ele o faz através de "Gerenciamento de Energia". Leia man pm-action
, que diz, em parte:
/etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d
Programs in these directories (called hooks) are combined and
executed in C sort order before suspend and hibernate with as
argument 'suspend' or 'hibernate'. Afterwards they are called in
reverse order with argument 'resume' and 'thaw' respectively. If
both directories contain a similar named file, the one in
/etc/pm/sleep.d will get preference. It is possible to disable a
hook in the distribution directory by putting a non-executable file
in /etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST
configuration variable.
Você pode colocar uma cópia executável do seu script (pronta para manipular o parâmetro "suspend", "hibernate", "resume" ou "thaw") em /etc/pm/sleep.d