File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -294,9 +294,9 @@ check_traffic_increase() {
294294 current_total_mb=\$ (get_total)
295295
296296 # Check if file exists
297- if [ -f "/root/usage/${interface} _traffic.txt" ]; then
297+ if [ -f "/root/usage/\ $ {interface}_traffic.txt" ]; then
298298 # Read the traffic data from file
299- read -r prev_total_mb < "/root/usage/${interface} _traffic.txt"
299+ read -r prev_total_mb < "/root/usage/\ $ {interface}_traffic.txt"
300300
301301 # Calculate traffic increase percentage
302302 increase=\$ (echo "scale=2; (\$ current_total_mb - \$ prev_total_mb) / \$ prev_total_mb * 100" | bc)
@@ -308,7 +308,7 @@ check_traffic_increase() {
308308 fi
309309
310310 # Save current traffic data to file
311- echo "$current_total_mb " > "/root/usage/${interface} _traffic.txt"
311+ echo "\ $ current_total_mb" > "/root/usage/\ $ {interface}_traffic.txt"
312312}
313313
314314check_traffic_increase
You can’t perform that action at this time.
0 commit comments