[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to execute a scrift after resume from suspend



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jun 15, 2016 at 11:37:43AM +0200, Hans wrote:
> Hi folks, 
> 
> is there a debian way, to execute a script after resume from suspend?
> 
> I need to execute the command
> 
> /etc/init.d/fancontrol restart
> 
> after the system is awaken again. As I am using plasma5, there is an option, 
> to execute my own script. However, it is necessary, to run this command as 
> root. 
> 
> At the moment I do this manually, which is a little bit annoying, so it would 
> be nice, if there is an automatic solution.
> 
> Thanks for any hints.

Note that this might depend on your desktop environment, since those tend
to do many things "their own way".

One hint worth following would be the pm-action(8) manual page. It mentions
hook scripts which would live in /etc/pm/sleep.d and /etc/pm/config.d which
are called at suspend and resume. There's a /var/log/pm-suspend.log to help
you debug things.

hth
- -- tomás 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAldhJRoACgkQBcgs9XrR2kaJ/gCeJBfI/19POapnHOGwxh1zVUuQ
+Y8An2EWnnRGaspXhI7UuoX2hhflk0+8
=UTf8
-----END PGP SIGNATURE-----


Reply to: