From 22e25d802e2c308d5de91dee203ed2d3056ef50b Mon Sep 17 00:00:00 2001 From: Bryan Date: Sun, 20 Dec 2020 09:49:21 -0600 Subject: [PATCH] bug fixing --- doorcontrol-main.cgi | 5 +---- parse_query_string.sh | 2 -- unlock-main.cgi | 4 ++++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doorcontrol-main.cgi b/doorcontrol-main.cgi index 72aef9b..57353de 100755 --- a/doorcontrol-main.cgi +++ b/doorcontrol-main.cgi @@ -1,8 +1,5 @@ -#!/bin/bash +#! /bin/bash -echo "Content-type: application/json" -echo "" -echo "" echo '{"message": "test message"}' exit diff --git a/parse_query_string.sh b/parse_query_string.sh index e2e8bf5..b1e8221 100644 --- a/parse_query_string.sh +++ b/parse_query_string.sh @@ -1,5 +1,3 @@ -#! /bin/bash - # This will parse the variable $QUERY_STRING. # The values will be stored in an associative array. # The value for a key will be stored in the array element `${param[]}` diff --git a/unlock-main.cgi b/unlock-main.cgi index 28757bf..ac2907a 100755 --- a/unlock-main.cgi +++ b/unlock-main.cgi @@ -1,3 +1,7 @@ #! /bin/bash +echo "Content-type: application/json" +echo "" +echo "" + sudo /usr/local/www/cgi-bin/doorcontrol-main.cgi "$QUERY_STRING"