Skip to content

Commit ed9380e

Browse files
committed
Fix Status update in description bug!
1 parent a663a90 commit ed9380e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

module/service.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@ run_as_root() {
3838
fi
3939
}
4040

41-
4241
update_description() {
4342
local iface="$1"
4443
local algo="$2"
4544
local icon="🌐"
46-
45+
4746
case "$iface" in
4847
wlan) icon="🛜" ;;
4948
mobile) icon="📶" ;;
5049
esac
51-
50+
5251
local desc="TCP Optimisations & update tcp_cong_algo based on interface | iface: $iface $icon | algo: $algo"
53-
run_as_root "sed -i '0,/^description=.*/s//description='"$desc"'/' \"$MODPATH/module.prop\""
52+
run_as_root "sed -i '/^description=/d' \"$MODPATH/module.prop\" && echo \"description=$desc\" >> \"$MODPATH/module.prop\""
5453
}
5554

5655
kill_tcp_connections() {

0 commit comments

Comments
 (0)