more fixes

master
Bryan 2020-12-20 01:19:43 -06:00
parent 9503f2deb8
commit dadde3e748
1 changed files with 4 additions and 4 deletions

View File

@ -8,9 +8,9 @@ LOCKFILE="./doorcontrol-main.lock"
. parse_query_string.sh . parse_query_string.sh
# #
echo 'Content-type: application/json' echo "Content-type: application/json"
echo '' echo ""
echo '' echo ""
# Exit if instance already running # Exit if instance already running
if [ -e "$LOCKFILE" ]; then if [ -e "$LOCKFILE" ]; then
@ -22,7 +22,7 @@ fi
# Check password # Check password
read apiKey <"${PASSWD_FILE}" read apiKey <"${PASSWD_FILE}"
if [ "${param[apiKey]}" != "${apiKey}" ]; then if [ "${param[apiKey]}" != "${apiKey}" ]; then
echo '{"error": "Invalid credentials"}' echo '{"message": "Invalid credentials"}'
rm "$LOCKFILE" rm "$LOCKFILE"
exit 1 exit 1
fi fi