From 342c48c9cf0f699585ffa45a459149adf1faf972 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 15 Mar 2021 21:04:30 +0100 Subject: [PATCH] fix(core): fix start paramerter reloading (#3380) * fix(core): fix start paramerter reloading Co-authored-by: Daniel Gibbs --- linuxgsm.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/linuxgsm.sh b/linuxgsm.sh index 86957eb39..615ed9b41 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -453,7 +453,7 @@ else # shellcheck source=/dev/null source "${servercfgfullpath}" fi - + # reload startparameters. if grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/secrets-${selfname}.cfg"; then eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/${selfname}.cfg"; then @@ -466,6 +466,18 @@ else eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi +# reload preexecutable. + if grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-${selfname}.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/${selfname}.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-common.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/common.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/common.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/_default.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/_default.cfg")" + # For legacy configs that still use parms= 15.03.21 if grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-${selfname}.cfg"; then eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")"