I am trying to run commands after my computer resumes.
This does not do anything. ?
It does not create a file when run manually or part of resume.
#!/bin/sh
#
# Created 3/31/19 in /usr/lib/systemd/system-sleep/
if [ “${1}” = “pre” ]; then
# Do the thing you want before suspend here
echo “we are suspending at $(date)…” > /home/andy/Downloads/systemd_suspend_test
elif [ “${1}” = “post” ]; then
# Do the thing you want after resume here
echo “…and we are back from $(date)” >> /home/andy/Downloads/systemd_suspend_test
/usr/bin/gxmessage -fg red -font ‘sans 30’ -timeout 3 ‘ Computer has now resumed from suspend state.’
fi
https://blog.christophersmart.com/2016/05/11/running-scripts-before-and-after-suspend-with-systemd/