Skip to content

Commit 342c48c

Browse files
h3o66dgibbs64
andauthored
fix(core): fix start paramerter reloading (#3380)
* fix(core): fix start paramerter reloading Co-authored-by: Daniel Gibbs <[email protected]>
1 parent 23f6c9a commit 342c48c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

linuxgsm.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ else
453453
# shellcheck source=/dev/null
454454
source "${servercfgfullpath}"
455455
fi
456-
456+
# reload startparameters.
457457
if grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/secrets-${selfname}.cfg"; then
458458
eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")"
459459
elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/${selfname}.cfg"; then
@@ -466,6 +466,18 @@ else
466466
eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/_default.cfg")"
467467
fi
468468

469+
# reload preexecutable.
470+
if grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-${selfname}.cfg"; then
471+
eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")"
472+
elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/${selfname}.cfg"; then
473+
eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")"
474+
elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-common.cfg"; then
475+
eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")"
476+
elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/common.cfg"; then
477+
eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/common.cfg")"
478+
elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/_default.cfg"; then
479+
eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/_default.cfg")"
480+
469481
# For legacy configs that still use parms= 15.03.21
470482
if grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-${selfname}.cfg"; then
471483
eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")"

0 commit comments

Comments
 (0)