Configured for jouya

This commit is contained in:
Justin Ouyang committed 2026-09-13 20:18:21 -05:00
1 parent 015a142735
commit 8a87db81c1
5 files changed
+18 -18

No files matched your search

+3 -3
View File
@@ -1,9 +1,9 @@
#/usr/bin/env bash
/Users/aryan/Documents/Github/fa26_cs425_.group-mp_.team-01/MP1/scripts/kill_mp.sh all
~/fa26_cs425_.group-mp_.team-01/MP1/scripts/kill_mp.sh all
for i in {1..10}; do
ssh -n -f -o BatchMode=yes "server$i" "cd fa26_cs425_.group-mp_.team-01/MP1 && git pull origin aryan && ~/fa26_cs425_.group-mp_.team-01/MP1/scripts/install_cmd.sh"
ssh -n -f -o BatchMode=yes "vm$i" "cd fa26_cs425_.group-mp_.team-01/MP1 && git switch justin && git pull origin justin && ~/fa26_cs425_.group-mp_.team-01/MP1/scripts/install_cmd.sh"
done
/Users/aryan/Documents/Github/fa26_cs425_.group-mp_.team-01/MP1/scripts/run_mp.sh all
~/fa26_cs425_.group-mp_.team-01/MP1/scripts/run_mp.sh all
+4 -4
View File
@@ -2,14 +2,14 @@
if [[ "$1" == "all" ]]; then
for i in {1..10}; do
echo "Killing server$i..."
ssh -o BatchMode=yes "server$i" "fuser -k -9 5055/tcp"
echo "Killing vm$i..."
ssh -o BatchMode=yes "vm$i" "fuser -k -9 5055/tcp"
echo ""
done
else
for i in "$@"; do
echo "Killing server$i..."
ssh -o BatchMode=yes "server$i" "fuser -k -9 5055/tcp"
echo "Killing vm$i..."
ssh -o BatchMode=yes "vm$i" "fuser -k -9 5055/tcp"
echo ""
done
fi
+4 -4
View File
@@ -16,18 +16,18 @@ fi
echo "Starting servers"
for i in $TARGETS; do
ssh -n -f -o BatchMode=yes "server$i" "$CMD"
ssh -n -f -o BatchMode=yes "vm$i" "$CMD"
done
sleep 2
for i in $TARGETS; do
pid=$(ssh -n -o BatchMode=yes "server$i" "pgrep -o -u \$USER -f '[p]ython3 server.py'")
pid=$(ssh -n -o BatchMode=yes "vm$i" "pgrep -o -u \$USER -f '[p]ython3 server.py'")
if [[ -n "$pid" ]]; then
pid_clean=$(echo "$pid" | tr '\n' ' ')
echo "Server$i is running with PID(s): $pid_clean"
echo "vm$i is running with PID(s): $pid_clean"
else
echo "Server$i is not running."
echo "vm$i is not running."
fi
done