Ready for version 1.1.2

PR for the main repository, version 1.1.2 with sms_tool as the major change
This commit is contained in:
Russel Yasol
2025-01-17 14:29:29 +08:00
parent 622d0d9361
commit 397e0de45a
139 changed files with 168 additions and 2883 deletions

View File

@@ -1,20 +0,0 @@
#!/bin/sh
# Set the content type to JSON
echo "Content-Type: application/json"
echo ""
# Run ethtool on eth0 and capture the output
ethtool_output=$(ethtool eth0)
# Extract Link Speed
speed=$(echo "$ethtool_output" | grep "Speed:" | awk '{print $2}')
# Extract Link Status
link_status=$(echo "$ethtool_output" | grep "Link detected:" | awk '{print $3}')
# Extract Auto-negotiation status
auto_negotiation=$(echo "$ethtool_output" | grep "Auto-negotiation:" | awk '{print $2}')
# Create JSON output
echo "{\"link_speed\": \"$speed\", \"link_status\": \"$link_status\", \"auto_negotiation\": \"$auto_negotiation\"}"