From 257b23e89ee309082da64e0181a9cb2b88e5656f Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 15 Nov 2021 20:34:18 -0700 Subject: [PATCH] Kill app before re-running on replit Addresses an issue where re-running an instance on replit caused an `[ERNO 98] Address already in use` error. Now it kills whatever process is running on the default Whoogle port (5000) before running the app. Fixes #531 --- .replit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.replit b/.replit index a02e438..4e8f812 100644 --- a/.replit +++ b/.replit @@ -1,3 +1,3 @@ language = "bash" -run = "pip install -r requirements.txt && ./run" -onBoot = "pip install -r requirements.txt && ./run" +run = "kill $(lsof -t -i:5000) > /dev/null 2>&1; pip install -r requirements.txt && ./run" +onBoot = "kill $(lsof -t -i:5000) > /dev/null 2>&1; pip install -r requirements.txt && ./run"