search

Sunday, March 22, 2020

Run command on suspend

Create a file located in /usr/lib/systemd/system-sleep directory:
#!/bin/sh
if [ "${1}" == "pre" ]; then
  nordvpn d
elif [ "${1}" == "post" ]; then
  echo "Hello"
fi

No comments:

Post a Comment