return json response if instance already running

master
Bryan 2020-12-20 23:40:51 -06:00
parent f10bf71a5b
commit 43f874fd55
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ LOCKFILE="./doorcontrol-main.lock"
# Exit if instance already running
if [ -e "$LOCKFILE" ]; then
echo '{"error": "running"}'
exit 1
else
touch "$LOCKFILE"