On Wed, 28.10.15 19:30, John (da_audioph...@yahoo.com) wrote:

> I have a simple bash script that I would like to have a user service
> file run with an argument when the system enters a sleep or
> hibernation state but as I understand it, user service units do not
> use the sleep.target.  The goal is to have the following run before
> the system goes into sleep/hibernate triggered by whatever mechanism
> systemd uses to detect when the user sleeps or hibernates the
> system: '/usr/bin/psd sync'

You can install a suspend delay inhibitor:

https://wiki.freedesktop.org/www/Software/systemd/inhibit/

That works from privileged code the same as for user code. However,
you cannot really do that from shell code. I fear for shell this is
simply not available, sorry.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to