Re: Running script after resuming suspend

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

 



> Yes. chmod +x as well. And #!/usr/bin/sh
> --

Odd, I just tried the same thing, using systemctl suspend to test.
grumpey@grumpey1 system-sleep]$ pwd
/usr/lib/systemd/system-sleep
[grumpey@grumpey1 system-sleep]$ ls -l
total 4
-rwxr-xr-x. 1 root root 101 Aug 24 15:26 test.bash
[grumpey@grumpey1 system-sleep]$ journalctl -b -g foo
Aug 24 15:27:03 grumpey1 systemd-sleep[12868]: foo
[grumpey@grumpey1 system-sleep]$ cat test.bash
#!/usr/bin/sh
case "$1/$2" in
      pre/*)
      ;;
      post/*)
         echo 'foo'
      ;;
esac

[grumpey@grumpey1 system-sleep]$ systemctl status systemd-suspend
○ systemd-suspend.service - System Suspend
     Loaded: loaded (/usr/lib/systemd/system/systemd-suspend.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)
       Docs: man:systemd-suspend.service(8)

Aug 24 15:02:18 grumpey1 systemd[1]: systemd-suspend.service:
Deactivated successfully.
Aug 24 15:02:18 grumpey1 systemd[1]: Finished systemd-suspend.service
- System Suspend.
Aug 24 15:27:01 grumpey1 systemd[1]: Starting systemd-suspend.service
- System Suspend...
Aug 24 15:27:01 grumpey1 systemd-sleep[12808]: Successfully froze unit
'user.slice'.
Aug 24 15:27:01 grumpey1 systemd-sleep[12808]: Performing sleep
operation 'suspend'...
Aug 24 15:27:03 grumpey1 systemd-sleep[12808]: System returned from
sleep operation 'suspend'.
Aug 24 15:27:03 grumpey1 systemd-sleep[12868]: foo
Aug 24 15:27:03 grumpey1 systemd-sleep[12808]: Successfully thawed
unit 'user.slice'.
Aug 24 15:27:03 grumpey1 systemd[1]: systemd-suspend.service:
Deactivated successfully.
Aug 24 15:27:03 grumpey1 systemd[1]: Finished systemd-suspend.service
- System Suspend.
[grumpey@grumpey1 system-sleep]$
-- 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux