Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/usr/local/bin/recfsusb2n $@
PID=`pgrep --parent 1 --oldest recfsusb2n`
if [ -z "${PID}" ]; then
exit 1
echo "recfsusb2n running: PID=${PID}"
trap 'kill -9 ${PID}; exit 0' 1 2 3 15
while [ -d "/proc/${PID}" ]; do
sleep 5
echo "PID=${PID} not found. exit."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment