I am trying to get a script to run after my computer has returned from a suspend state.
This is not working.
#!/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