File tree Expand file tree Collapse file tree 2 files changed +25
-29
lines changed Expand file tree Collapse file tree 2 files changed +25
-29
lines changed Original file line number Diff line number Diff line change 13
13
ps -ax | grep mongocryptd
14
14
pkill -f ' mongocryptd' || echo ' mongocryptd was already killed or not launched'
15
15
# check that it's actually killed
16
- ps -ax | grep mongocryptd
16
+ ps -ax | grep mongocryptd
17
17
fi
18
+
19
+ # The proxy server processes have almost certainly already been killed by the evergreen process cleaning though.
20
+ # This is just to be sure it already happened and delete the file containing the saved PIDs.
21
+
22
+ echo " Attempting to kill proxy servers if present and deleting PID file."
23
+ PID_FILE=" socks5_pids.txt"
24
+
25
+ if [[ ! -f " $PID_FILE " ]]; then
26
+ echo " No PID file found ($PID_FILE )"
27
+ exit 0
28
+ fi
29
+
30
+ cat " $PID_FILE " | while read -r pid; do
31
+ if [[ -n " $pid " ]]; then
32
+ if [[ " $OS " =~ Windows| windows ]]; then
33
+ powershell -NoProfile -Command " Stop-Process -Id $pid -Force" 2> $null || \
34
+ echo " PID $pid already gone"
35
+ else
36
+ kill " $pid " 2> /dev/null || echo " PID $pid already gone"
37
+ fi
38
+ fi
39
+ done
40
+
41
+ rm -f " $PID_FILE "
Original file line number Diff line number Diff line change @@ -833,34 +833,6 @@ functions:
833
833
- " OS"
834
834
args :
835
835
- evergreen/cleanup-test-resources.sh
836
- - command : shell.exec
837
- params :
838
- shell : " bash"
839
- script : |
840
- #This script kills the test SOCKS5 proxy servers.
841
- #The server processes have almost certainly already been killed by the evergreen process cleaning though.
842
- #This is just to be sure it already happened and delete the file containing the saved PIDs.
843
-
844
- echo "Killing proxies"
845
- PID_FILE="socks5_pids.txt"
846
-
847
- if [[ ! -f "$PID_FILE" ]]; then
848
- echo "No PID file found ($PID_FILE)"
849
- exit 0
850
- fi
851
-
852
- cat "$PID_FILE" | while read -r pid; do
853
- if [[ -n "$pid" ]]; then
854
- if [[ "$OS" =~ Windows|windows ]]; then
855
- powershell -NoProfile -Command "Stop-Process -Id $pid -Force" 2>$null || \
856
- echo "PID $pid already gone"
857
- else
858
- kill "$pid" 2>/dev/null || echo "PID $pid already gone"
859
- fi
860
- fi
861
- done
862
-
863
- rm -f "$PID_FILE"
864
836
865
837
fix-absolute-paths :
866
838
- command : shell.exec
You can’t perform that action at this time.
0 commit comments