hestiacp
hestiacp copied to clipboard
Update v-change-user-package
Prevent open 3 process
The new awk -F"'" '/SHELL/ {print $2}' no longer stops after the first match, while the previous grep -m1 … | cut … did. If a package file ever contains more than one SHELL token (e.g., a commented-out legacy value or additional SHELL-related directives), the command substitution now returns multiple lines, and v-change-user-shell
receives a newline-separated list that will almost certainly fail.
Maybe add exit after the first print ( {print $2; exit}) so only the primary variable matches to preserve the old grep behavior.