This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
powerpanel-webview/send_upsc_data.sh

8 lines
No EOL
270 B
Bash

#!/bin/bash
while [ 1 -gt 0 ]; do
sleep 15
OUTPUT=( $(echo $(upsc nutdev1@192.168.6.211)) )
echo "{\"data\": \"${OUTPUT[*]//[$'\t\r\n ']}\"}" | \
curl -H "Content-Type: application/json" -X POST -d @- http://powerpanel-webview:3555/api/upsc_handler
done