From 4ad447ba6c736c250b2478a4dbd884abe6d15f3c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 29 Mar 2020 11:43:26 -0500 Subject: [PATCH] Used shell when FTB server script missing shebang line For #467 --- start-minecraftFinalSetup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index e9920f11..9d2aa093 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -119,6 +119,10 @@ EOF if [ -f "${FTB_DIR}/settings.cfg" ]; then sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg" 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}" log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."