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() {
2020 esac
2121
2222 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"
2427}
2528
2629kill_tcp_connections () {
@@ -156,7 +159,10 @@ apply_cellular_settings() {
156159# On startup, reset description to default
157160if [ -f " $MODPATH /module.prop" ]; then
158161 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"
160166fi
161167
162168# IPv4 TCP optimizations
You can’t perform that action at this time.
0 commit comments