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

Re: How to execute a scrift after resume from suspend



Hi Michael, 

yes I am using systemd. At the moment I put a script in 
/lib/systemd/systemd-sleep/ named "fancontrol" which has the only lines 

#!/bin/bash
/etc/init.d/fancontrol restart

Seems to work, but as your script is much more professional, I will use 
that. :)

Thanks for it!

Best regards

Hans



> in case you are using systemd, it seems like the "official" way is to
> put a script into  /lib/systemd/system-sleep which will be executed on
> any suspend or resume with either "pre" or "post" as argument (iirc). In
> your case the script's contents might look like:
> 
> ################################
> #!/bin/sh
> 
> case "${1}" in
>         post)
>             /etc/init.d/fancontrol restart
>         ;;
> esac
> 
> exit 0
> ################################
> 
> Best regards
> 
> Michael
> 
> 
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
> 
> The heart is not a logical organ.
> 		-- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4


Reply to: