mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-03-19 13:05:58 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5a4428515 | ||
|
|
6b9033318b |
@@ -8,7 +8,7 @@ RUN apk add -U \
|
|||||||
lsof \
|
lsof \
|
||||||
su-exec \
|
su-exec \
|
||||||
bash \
|
bash \
|
||||||
curl \
|
curl iputils wget \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
mysql-client \
|
mysql-client \
|
||||||
|
|||||||
@@ -270,16 +270,18 @@ function installFTB {
|
|||||||
local srv_modpack=${FTB_SERVER_MOD}
|
local srv_modpack=${FTB_SERVER_MOD}
|
||||||
if isURL ${srv_modpack}; then
|
if isURL ${srv_modpack}; then
|
||||||
case $srv_modpack in
|
case $srv_modpack in
|
||||||
*/download)
|
https://www.feed-the-beast.com/*/download)
|
||||||
break;;
|
break;;
|
||||||
*)
|
https://www.feed-the-beast.com/*)
|
||||||
srv_modpack=${srv_modpack}/download;;
|
srv_modpack=${srv_modpack}/download;;
|
||||||
esac
|
esac
|
||||||
local file=$(basename $(dirname $srv_modpack))
|
local file=$(basename $(dirname $srv_modpack))
|
||||||
local downloaded=/data/${file}.zip
|
local downloaded=/data/${file}.zip
|
||||||
echo "Downloading FTB modpack...
|
if [ ! -e $downloaded ]; then
|
||||||
|
echo "Downloading FTB modpack...
|
||||||
$srv_modpack -> $downloaded"
|
$srv_modpack -> $downloaded"
|
||||||
curl -sSL -o $downloaded $srv_modpack
|
curl -sSL -o $downloaded $srv_modpack
|
||||||
|
fi
|
||||||
srv_modpack=$downloaded
|
srv_modpack=$downloaded
|
||||||
fi
|
fi
|
||||||
if [[ ${srv_modpack:0:5} == "data/" ]]; then
|
if [[ ${srv_modpack:0:5} == "data/" ]]; then
|
||||||
@@ -300,10 +302,12 @@ function installFTB {
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
if [ ! -d ${FTB_DIR} ]; then
|
||||||
mkdir -p ${FTB_DIR}
|
echo "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||||
unzip -o ${srv_modpack} -d ${FTB_DIR}
|
mkdir -p ${FTB_DIR}
|
||||||
cp -f /data/eula.txt ${FTB_DIR}/eula.txt
|
unzip -o ${srv_modpack} -d ${FTB_DIR}
|
||||||
|
cp -f /data/eula.txt ${FTB_DIR}/eula.txt
|
||||||
|
fi
|
||||||
FTB_SERVER_START=${FTB_DIR}/ServerStart.sh
|
FTB_SERVER_START=${FTB_DIR}/ServerStart.sh
|
||||||
chmod a+x ${FTB_SERVER_START}
|
chmod a+x ${FTB_SERVER_START}
|
||||||
sed -i "s/-jar/-Dfml.queryResult=confirm -jar/" ${FTB_SERVER_START}
|
sed -i "s/-jar/-Dfml.queryResult=confirm -jar/" ${FTB_SERVER_START}
|
||||||
@@ -646,7 +650,7 @@ if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
|||||||
cp -f /data/{eula,ops,white-list}.txt ${FTB_DIR}/
|
cp -f /data/{eula,ops,white-list}.txt ${FTB_DIR}/
|
||||||
cd ${FTB_DIR}
|
cd ${FTB_DIR}
|
||||||
echo "Running FTB server modpack start ..."
|
echo "Running FTB server modpack start ..."
|
||||||
exec sh ${FTB_SERVER_START}
|
exec ${FTB_SERVER_START}
|
||||||
else
|
else
|
||||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||||
if [ -f /data/bootstrap.txt ];
|
if [ -f /data/bootstrap.txt ];
|
||||||
|
|||||||
Reference in New Issue
Block a user