File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ update_description() {
20
20
esac
21
21
22
22
local desc=" TCP Optimisations & update tcp_cong_algo based on interface | iface: $iface $icon | algo: $algo "
23
- sed -i ' /^description=/d' " $MODPATH /module.prop" && echo " description=$desc " >> " $MODPATH /module.prop"
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"
24
27
}
25
28
26
29
kill_tcp_connections () {
@@ -156,7 +159,10 @@ apply_cellular_settings() {
156
159
# On startup, reset description to default
157
160
if [ -f " $MODPATH /module.prop" ]; then
158
161
default_desc=" TCP Optimisations & update tcp_cong_algo based on interface"
159
- sed -i ' /^description=/d' " $MODPATH /module.prop" && echo " description=$default_desc " >> " $MODPATH /module.prop"
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"
160
166
fi
161
167
162
168
# IPv4 TCP optimizations
You can’t perform that action at this time.
0 commit comments