Skip to content

Instantly share code, notes, and snippets.

@vando vando/30_process
Created May 13, 2015

Embed
What would you like to do?
Action script to kill process before suspend.
#!/bin/sh
#
# /etc/pm/sleep.d/30_process
# Action script to kill process before suspend.
PROCESS="ssh getmail"
PATH=/usr/bin
case ${1} in
suspend|hibernate)
for PROC in ${PROCESS}
do
pkill -HUP -f ^${PROC}
done
;;
resume|thaw)
# None.
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.