Skip to content

Commit

Permalink
Add fix for pax logging to avoid starting screen sessions if they alr…
Browse files Browse the repository at this point in the history
…eady exist

Signed-off-by: Anthony Floeder <[email protected]>
  • Loading branch information
ajfloeder committed Jun 21, 2023
1 parent d6b580c commit 5346e8c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/rabbit-s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ case $CMD in

echo "Enabling Logging on $PAX"
$SSHPASS ssh -T root@$SYSTEM <<-EOF
[ "$(screen -ls | grep $PAX)" == "" ] &&
screen -dmS $DEVICE 230400 &&
screen -S $PAX -X colon "logfile $PAX.log^M" &&
screen -S $PAX -X colon "logfile flush 1^M" &&
screen -S $PAX -X colon "log on^M"
if ! screen -list | grep -q "$PAX"; then
screen -dmS $DEVICE 230400 &&
screen -S $PAX -X colon "logfile $PAX.log^M" &&
screen -S $PAX -X colon "logfile flush 1^M" &&
screen -S $PAX -X colon "log on^M"
fi

This comment has been minimized.

Copy link
@bdevcich

bdevcich Jun 22, 2023

Contributor

Much better!

EOF
done
;;
Expand Down

0 comments on commit 5346e8c

Please sign in to comment.