diff --git a/handle_post.sh b/handle_post.sh index 86e010b..ab993f2 100755 --- a/handle_post.sh +++ b/handle_post.sh @@ -6,10 +6,10 @@ if [[ "$REQUEST_PATH_SANE" =~ ^refresh ]]; then body="{\n\"time\": \"$(date +%T)\",\n" body+="\"status\": \"ok\"\n}\n" - header=$($BASHSERV_DIR/header.sh -t "application/json" -l $(echo -ne "$body" | wc -c)) - printf "%b\n%b" "$header" "$body" + $BASHSERV_DIR/header.sh -t "application/json" -l $(echo -ne "$body" | wc -c) + printf "%b" "$body" - echo -ne "$body" > status/$ip + printf "%b" "$body" > status/$ip ret=1 for i in {0..30}; do @@ -34,10 +34,8 @@ if [[ "$REQUEST_PATH_SANE" =~ ^wol ]]; then wol "$mac" > /dev/null body="{\"response\": \"ok\"}\n" -cat <