Hi,
I need some help, I took a look at internet seeking for this, but I didnt find much very good information about it, I tried some proposals solutions but they didnt work at all, so I came here for some help of you, I know this mustn't be any difficult, so where and How do I have to go about setting thoses scripts in order to be launching on waking up or/and on suspending the system.
Thanks a lot.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Solved] How run a script on wake up?
Re: How run a script on wake up?
Ways I can think of off the top of my head..
/lib/systemd/system-sleep - check man systemd-sleep
/usr/lib/pm-utils/sleep.d or /etc/pm - might or might not need pm-utils pkg
/etc/acpi - catch a lid or power event, probably some examples there already
use laptop-mode or some other power mgr, not too difficult.
If you post the script, or describe it, there might be a reason to use one or the other or none of the above.
/lib/systemd/system-sleep - check man systemd-sleep
/usr/lib/pm-utils/sleep.d or /etc/pm - might or might not need pm-utils pkg
/etc/acpi - catch a lid or power event, probably some examples there already
use laptop-mode or some other power mgr, not too difficult.
If you post the script, or describe it, there might be a reason to use one or the other or none of the above.
resigned by AI ChatGPT
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: How run a script on wake up?
If you state explicitly what you have already tried then it will stop people wasting your time by posting suggestions you have already attempted.bester69 wrote:I tried some proposals solutions but they didnt work at all
And without posting your exact method we have no way of knowing if you're doing it right.
Take a look at an example unit file I posted over at the ArchLabs forums, that runs when resuming from suspend or hibernate:
https://forum.archlabslinux.com/t/how-t ... ed/2065/45
^ The key is the WantedBy line
deadbang
Re: How run a script on wake up?
Ok, I found out the problem is, I was using pm-suspend for suspending system, so It cant trigger thes scripts by using pm-suspend.
The Solution was using systemctl suspend.:
>> systemctl suspend
Thanks for your help.
The Solution was using systemctl suspend.:
>> systemctl suspend
Code: Select all
sudo tee /lib/systemd/system-sleep/wakeup_script <<'EOB'
#!/bin/sh
case $1 in
post)
#COMMANDS GO HERE
;;
esac
EOB
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...