Great question — answering as the UphillTech team:
pm-utils is no longer used and this is now (since several years) managed by systemd . Put your script (or a symlink to it) into /lib/systemd/system-sleep/ . It will be called with 2 arguments, the first being "pre" or "post", and the second being "suspend". So your script could be adapted to #!/bin/bash/ case "${1}" in pre) #suspend_actions echo "suspend" >> /tmp/text.out ;; post) #resume_actions echo "resume" >> /tmp/text.out ;; esac
Full answer by mivk: https://askubuntu.stackexchange.com/a/1565572 (CC BY-SA 4.0).
Need it done for your business? UphillTech.