Used shell when FTB server script missing shebang line

For #467
This commit is contained in:
Geoff Bourne 2020-03-29 11:43:26 -05:00
parent 736979c20b
commit 4ad447ba6c

View File

@ -119,6 +119,10 @@ EOF
if [ -f "${FTB_DIR}/settings.cfg" ]; then if [ -f "${FTB_DIR}/settings.cfg" ]; then
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg" sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
fi fi
# if missing shebang line, then run file through bash
if ! head -1 "${FTB_SERVER_START}"|grep -q "^#!"; then
mcServerRunnerArgs="${mcServerRunnerArgs} --shell bash"
fi
cd "${FTB_DIR}" cd "${FTB_DIR}"
log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..." log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."