more fixes
parent
9503f2deb8
commit
dadde3e748
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue