Skip to content

Instantly share code, notes, and snippets.

@dankow
Created December 14, 2016 21:56
Show Gist options
  • Save dankow/5ced2974a04c25b282abda210523462c to your computer and use it in GitHub Desktop.
Save dankow/5ced2974a04c25b282abda210523462c to your computer and use it in GitHub Desktop.
PGID=$(pgrep -f ${CONFIG:-backup_driver.py} | xargs ps -opgid --no-headers | tail -1 | tr -d '[[:space:]]') && ps -ww -opid,ppid,pgid,state,time,cmd --forest -g $PGID | sed 's^/usr/local/percona-backup/bin/^^g' && read -r -p "Are you sure? [y/N] " response; if [[ $response =~ ^(yes|y)$ ]]; then sudo kill -9 -- -${PGID}; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment