Skip to content

Commit ebaa43d

Browse files
committed
Fix Description Update
1 parent ec572b4 commit ebaa43d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

module/service.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ update_description() {
1919
Cellular) icon="📶" ;;
2020
esac
2121

22-
local desc="TCP Optimisations & update tcp_cong_algo based on interface | iface: $iface $icon | algo: $algo"
23-
# Remove old description
24-
sed -i '/^description=/d' "$MODPATH/module.prop"
25-
# Append new description with leading newline
26-
printf '\ndescription=%s\n' "$desc" >> "$MODPATH/module.prop"
22+
local desc="TCP Optimisations \& update tcp_cong_algo based on interface \| iface\: $iface $icon \| algo\: $algo"
23+
sed -i -e "s/^description=.*/description=$desc/" "$MODPATH/module.prop"
2724
}
2825

2926
kill_tcp_connections() {
@@ -159,10 +156,7 @@ apply_cellular_settings() {
159156
# On startup, reset description to default
160157
if [ -f "$MODPATH/module.prop" ]; then
161158
default_desc="TCP Optimisations & update tcp_cong_algo based on interface"
162-
# Remove existing description line (if any)
163-
sed -i '/^description=/d' "$MODPATH/module.prop"
164-
# Append new description with leading newline for safety
165-
printf '\ndescription=%s\n' "$default_desc" >> "$MODPATH/module.prop"
159+
sed -i -e "s/^description=.*/description=$default_desc/" "$MODPATH/module.prop"
166160
fi
167161

168162
# IPv4 TCP optimizations

0 commit comments

Comments
 (0)