@ -444,18 +444,28 @@ else
# shellcheck source=/dev/null
source " ${ configdirserver } /secrets- ${ selfname } .cfg "
fi
# Use eval if startparameters are only in _default.cfg to ensure all vars in startparameters are set.
if ! grep -qE "^[[:blank:]]*startparameters=" " ${ configdirserver } /common.cfg " " ${ configdirserver } / ${ selfname } .cfg " " ${ configdirserver } /secrets-common.cfg " " ${ configdirserver } /secrets- ${ selfname } .cfg " ; then
# Reloads start parameter to ensure all vars in startparameters are set.
# Will reload the last defined startparameter.
fn_reload_startparameters( ) {
# reload Wurm config.
if [ " ${ shortname } " = = "wurm" ] ; then
# shellcheck source=/dev/null
source " ${ servercfgfullpath } "
fi
if [ -n " ${ preexecutable } " ] ; then
eval preexecutable = " $( sed -nr 's/^ *preexecutable=(.*)$/\1/p' " ${ configdirserver } /_default.cfg " ) "
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
eval startparameters = " $( sed -nr 's/^ *startparameters=(.*)$/\1/p' " ${ configdirserver } / ${ selfname } .cfg " ) "
elif grep -qE "^[[:blank:]]*startparameters=" " ${ configdirserver } /secrets-common.cfg " ; then
eval startparameters = " $( sed -nr 's/^ *startparameters=(.*)$/\1/p' " ${ configdirserver } /secrets-common.cfg " ) "
elif grep -qE "^[[:blank:]]*startparameters=" " ${ configdirserver } /common.cfg " ; then
eval startparameters = " $( sed -nr 's/^ *startparameters=(.*)$/\1/p' " ${ configdirserver } /common.cfg " ) "
elif grep -qE "^[[:blank:]]*startparameters=" " ${ configdirserver } /_default.cfg " ; then
eval startparameters = " $( sed -nr 's/^ *startparameters=(.*)$/\1/p' " ${ configdirserver } /_default.cfg " ) "
fi
eval startparameters = " $( sed -nr 's/^ *startparameters=(.*)$/\1/p' " ${ configdirserver } /_default.cfg " ) "
fi
}
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f " ${ tmpdir } /linuxgsm.sh " ] ; then