Files
quectel-rgmii-toolkit/simpleadmin/www/cgi-bin/get_watchcat_status
2024-05-25 07:54:30 +08:00

18 lines
398 B
Bash

#!/bin/bash
# Content type header
echo "Content-type: application/json"
echo ""
# This script fetches the watchCat parameters from the /tmp/watchCatParams.json file and returns it as JSON
# Check if the file exists
if [ -f /tmp/watchCatParams.json ]; then
# Read the file and return the content
cat /tmp/watchCatParams.json
else
# Return an empty JSON object
echo "{}"
fi
exit 0