Creating Suspend and Resume Scripts

Scripts will reside in the following folder

/storage/.config/sleep.d

Scripts should be name similar to the following.

01-script-name.power
02-script-name.power

The scripts should also use the following format

#!/bin/sh
case "$1" in
   pre)
     # What to do on suspend
     ;;
   post)
     # What to do on resume
     ;;
esac

Scripts are executed in numbered order and do not run in parallel, they run sequentially.