Skip to content

Commit 120b7ce

Browse files
committed
update install.sh
1 parent d78367b commit 120b7ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
314314
check_traffic_increase

0 commit comments

Comments
 (0)