I thought scripts in this dir were run when computer resumes from a sleep state.
/lib/systemd/system-sleep/
Everything works except the cvlc command.
#!/bin/sh
if [ "${1}" == "pre" ]; then
# Do the thing you want before suspend here, e.g.:
echo "we are suspending at $(date)..." > /tmp/systemd_suspend_test
cvlc --play-and-exit /usr/share/sounds/My_Sounds/Short_doorbell.wav
elif [ "${1}" == "post" ]; then
# Do the thing you want after resume here, e.g.:
echo "...and we are back from $(date)" >> /tmp/systemd_suspend_test
cvlc --play-and-exit /usr/share/sounds/My_Sounds/Short_doorbell.wav
fi