Skip to content

Commit 9ddda27

Browse files
authored
Make pkill case insensitive (#3745)
1 parent 9d1d7a5 commit 9ddda27

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/tools/scripts/deploy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ git pull origin main
102102

103103
if [ "$(pgrep -if 'python main.py')" ]; then
104104
echo "Killing existing server to run a fresh version"
105-
pkill -9 python main.py
105+
pkill -9 -if "python main.py"
106106
fi
107107

108108
#Remove generated chapters and e-books (in case new one from other branch in there)
@@ -190,7 +190,7 @@ git checkout main
190190

191191
if [ "$(pgrep -if 'python main.py')" ]; then
192192
echo "Killing server so backgrounded version isn't left there"
193-
pkill -9 -f "python main.py"
193+
pkill -9 -if "python main.py"
194194
fi
195195

196196
echo

src/tools/scripts/run_and_test_website.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ fi
5353

5454
if [ "$(pgrep -if 'python main.py')" ]; then
5555
echo "Killing existing server to run a fresh version"
56-
pkill -9 -f "python main.py"
56+
pkill -9 -if "python main.py"
5757
fi
5858

5959
if [ "$(pgrep -if 'node ./tools/generate/chapter_watcher')" ]; then
6060
echo "Killing existing watcher to run a fresh version"
61-
pkill -9 -f "node ./tools/generate/chapter_watcher"
61+
pkill -9 -if "node ./tools/generate/chapter_watcher"
6262
fi
6363

6464
echo "Installing and testing python environment"
@@ -105,7 +105,7 @@ if [ "${debug}" == "1" ]; then
105105

106106
if [ "$(pgrep -if 'python main.py')" ]; then
107107
echo "Killing server to run a fresh version in debug mode"
108-
pkill -9 -f "python main.py"
108+
pkill -9 -if "python main.py"
109109
fi
110110

111111
echo "Starting website in foreground mode so it reloads on file changes"

src/tools/scripts/stop_website.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# It is useful as sometimes these are backgrounded so this offers a quick way of stopping them.
1010
#
1111

12-
pkill -9 -f "python main.py"
13-
pkill -9 -f "./tools/generate/chapter_watcher"
12+
pkill -9 -if "python main.py"
13+
pkill -9 -if "./tools/generate/chapter_watcher"
1414

1515
exit 0

0 commit comments

Comments
 (0)