Note that scripts or binaries dropped in /usr/lib/systemd/system-sleep/ are intended for local use only and
should be considered hacks. If applications want to be notified of
system suspend/hibernation and resume, there are much nicer
interfaces available.
(I can't find from that man-page what those interfaces are though.)
#64 wrote "could this suggest this might be better fixed with a systemd dependency?", well, http:// man7.org/ linux/man- pages/man8/ systemd- sleep.8. html says
Note that scripts or binaries dropped in
/usr/lib/ systemd/ system- sleep/ are intended for local use only and
should be considered hacks. If applications want to be notified of
system suspend/hibernation and resume, there are much nicer
interfaces available.
(I can't find from that man-page what those interfaces are though.)