[clug] How to run a script on resume from hibernate?

Chris Smart clug at christophersmart.com
Thu Jul 30 22:54:05 UTC 2015


On 28/07/15 19:49, Eyal Lebedinsky wrote:
> I used to have my scripts run from /etc/pm/sleep.d but after upgrading
> f19->f22
> this is not done anymore.
> 
> Is there another place now to drop startup scripts?
> It is probably possible to add some systemd rules but I hope there is a
> simpler way.
> 

See:
man systemd-suspend.service

Put an executable script at /usr/lib/systemd/system-sleep/local.sh

When resuming from suspend the "post" argument should be passed in, so
get your script to check for that and if true, run what you want.

-c



More information about the linux mailing list