make rotate.sh first class citizen for receiving signal

This commit is contained in:
Bel LaPointe
2023-03-24 14:44:47 -06:00
parent bf677856a2
commit cdfcfe8fd0
2 changed files with 9 additions and 15 deletions

View File

@@ -11,6 +11,8 @@ mayhem_party_rotate() {
pkill -SIGUSR1 -f mayhem-party
}
trap mayhem_party_rotate SIGUSR1
if [ "$0" == "$BASH_SOURCE" ]; then
NEXT=0 mayhem_party_rotate
while read -p "$(date) > [press enter to rotate]"; do