server-geomyidae.sh: use exact match for pgrep - postreich - Unnamed repository; edit this file 'description' to name the repository. DIR Log DIR Files DIR Refs DIR README --- DIR commit 51aadc57cdc39e4976207cad6af9b9c0f76f16d9 DIR parent 4e6ef2335c7010e481927b7f4a708c42788d2090 HTML Author: Scarlett McAllister <no+reply@roygbyte.com> Date: Sun, 28 Jan 2024 18:53:15 -0400 server-geomyidae.sh: use exact match for pgrep Otherwise, pgrep will match the shell script "serve-geomyidae.sh". Diffstat: M src/serve-geomyidae.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- DIR diff --git a/src/serve-geomyidae.sh b/src/serve-geomyidae.sh @@ -2,11 +2,11 @@ # # Launch a server for testing. # -pid=$( pgrep "geomyidae" ) +pid=$( pgrep --exact "geomyidae" ) if [ ! -z "$pid" ]; then printf "Found existing server with pid %s\n" $pid - # sudo kill $pid - # printf "Killed it\n" + sudo kill $pid + printf "Killed it\n" fi sudo geomyidae -p 70 -h localhost -b ./geomyidae/ -l ./log.txt if [ $? ]; then