Skip to content

Instantly share code, notes, and snippets.

@drobbins
Last active December 20, 2015 15:48
Show Gist options
  • Save drobbins/6156376 to your computer and use it in GitHub Desktop.
Save drobbins/6156376 to your computer and use it in GitHub Desktop.
Makefile that creates a script (sigsur2ag.sh) to send a SIGUSR2 signal to each running AG process.
always:
processes.txt: always
ps axf > processes.txt
script: processes.txt
awk 'BEGIN {print "#!/bin/bash";} /AG/ { print "kill -s sigusr2",$$1 }' processes.txt > sigsur2ag.sh
chmod +x sigsur2ag.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment