mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Compare commits
18 Commits
2021.8.0-j
...
2021.11.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb8c7756c7 | ||
|
|
3261fbd7e9 | ||
|
|
7164d2b885 | ||
|
|
0c860ade12 | ||
|
|
cfb2739cd9 | ||
|
|
b1bb3f38f3 | ||
|
|
a99f7a494b | ||
|
|
65b3997e72 | ||
|
|
3e9308d315 | ||
|
|
5f48a4e5e5 | ||
|
|
b731eaaffb | ||
|
|
75f5a430e4 | ||
|
|
e0c721585e | ||
|
|
da21c2e0a7 | ||
|
|
2b989e4c39 | ||
|
|
7d6c80b941 | ||
|
|
cbf9577a24 | ||
|
|
70ea32e89d |
34
README.md
34
README.md
@@ -262,7 +262,7 @@ If you want old mods to be removed as the `/mods` content is updated, then add `
|
|||||||
|
|
||||||
For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory.
|
For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory.
|
||||||
|
|
||||||
You can specify the destination of the files that are copied from `/config` by setting the `COPY_CONFIG_DEST` variable, where the default is `/data/config`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory.
|
You can specify the destination of the files that are copied from `/mods` and `/config` by setting the `COPY_MODS_DEST` and `COPY_CONFIG_DEST`, where the default is `/data/mods` and `/data/config`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory.
|
||||||
|
|
||||||
> NOTE: If a file was updated in the destination path and is newer than the source file from `/config`, then it will not be overwritten.
|
> NOTE: If a file was updated in the destination path and is newer than the source file from `/config`, then it will not be overwritten.
|
||||||
|
|
||||||
@@ -327,6 +327,10 @@ An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of T
|
|||||||
|
|
||||||
> **NOTE** only Java 8 and 11 are supported
|
> **NOTE** only Java 8 and 11 are supported
|
||||||
|
|
||||||
|
Extra variables:
|
||||||
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler
|
||||||
|
|
||||||
## Running a Purpur server
|
## Running a Purpur server
|
||||||
|
|
||||||
A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper, Tuinity, Airplane with the goal of providing new and interesting configuration options".
|
A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper, Tuinity, Airplane with the goal of providing new and interesting configuration options".
|
||||||
@@ -338,6 +342,7 @@ A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper, Tuinity,
|
|||||||
Extra variables:
|
Extra variables:
|
||||||
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
||||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler
|
||||||
|
|
||||||
## Running a Yatopia server
|
## Running a Yatopia server
|
||||||
|
|
||||||
@@ -350,6 +355,7 @@ A [Yatopia](https://github.com/YatopiaMC/Yatopia) server, which is a "blazing fa
|
|||||||
Extra variables:
|
Extra variables:
|
||||||
- `RELEASE=stable` : set to `stable` or `latest`
|
- `RELEASE=stable` : set to `stable` or `latest`
|
||||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the [Flare](https://blog.airplane.gg/flare) profiler
|
||||||
|
|
||||||
## Running a Magma server
|
## Running a Magma server
|
||||||
|
|
||||||
@@ -506,9 +512,9 @@ the `/path/on/host` folder contents look like:
|
|||||||
```
|
```
|
||||||
/path/on/host
|
/path/on/host
|
||||||
├── mods
|
├── mods
|
||||||
│ └── ... INSTALL MODS HERE ...
|
│ └── ... INSTALL MODS HERE ...
|
||||||
├── config
|
├── config
|
||||||
│ └── ... CONFIGURE MODS HERE ...
|
│ └── ... CONFIGURE MODS HERE ...
|
||||||
├── ops.json
|
├── ops.json
|
||||||
├── server.properties
|
├── server.properties
|
||||||
├── whitelist.json
|
├── whitelist.json
|
||||||
@@ -521,24 +527,20 @@ up:
|
|||||||
docker stop mc
|
docker stop mc
|
||||||
docker start mc
|
docker start mc
|
||||||
|
|
||||||
### Using separate mounts
|
## Optional plugins, mods, and config attach points
|
||||||
|
|
||||||
This is the easiest way if you are using an ephemeral `/data` filesystem,
|
There are optional volume paths that can be attached to supply content to be copied into the data area:
|
||||||
or downloading a world with the `WORLD` option.
|
|
||||||
|
|
||||||
There are two additional volumes that can be mounted; `/mods` and `/config`.
|
`/plugins`
|
||||||
Any files in either of these filesystems will be copied over to the main
|
: contents are copied into `/data/plugins` for Bukkit related server types. Set `PLUGINS_SYNC_UPDATE=false` if you want files from `/plugins` to take precedence over newer files in `/data/plugins`.
|
||||||
`/data` filesystem before starting Minecraft.
|
|
||||||
|
|
||||||
This works well if you want to have a common set of modules in a separate
|
`/mods`
|
||||||
location, but still have multiple worlds with different server requirements
|
: contents are copied into `/data/mods` for Forge related server types
|
||||||
in either persistent volumes or a downloadable archive.
|
|
||||||
|
|
||||||
## Deploying plugins from attached volume
|
`/config`
|
||||||
|
: contents are copied into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`
|
||||||
|
|
||||||
If the `/plugins` directory exists in the container, such as from an attached volume, any files in this directory will be copied over to `/data/plugins` before starting Minecraft. Set `PLUGINS_SYNC_UPDATE=false` if you want files from `/plugins` to take precedence over newer files in `/data/plugins`.
|
These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.
|
||||||
|
|
||||||
This works well if you want to have a common set of plugins in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.
|
|
||||||
|
|
||||||
## Auto-downloading SpigotMC/Bukkit/PaperMC plugins
|
## Auto-downloading SpigotMC/Bukkit/PaperMC plugins
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ fi
|
|||||||
|
|
||||||
export SERVER=airplane-${VANILLA_VERSION}-jdk${JAVA_VER}.jar
|
export SERVER=airplane-${VANILLA_VERSION}-jdk${JAVA_VER}.jar
|
||||||
|
|
||||||
if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
downloadUrl="https://dl.airplane.gg/latest/Airplane-JDK${JAVA_VER}/launcher-airplane.jar"
|
downloadUrl="https://dl.airplane.gg/latest/Airplane-JDK${JAVA_VER}/launcher-airplane.jar"
|
||||||
log "Downloading Airplane from $downloadUrl ..."
|
log "Downloading Airplane from $downloadUrl ..."
|
||||||
curl -fsSL -o "$SERVER" "$downloadUrl"
|
curl -fsSL -o "$SERVER" "$downloadUrl"
|
||||||
@@ -33,5 +33,4 @@ fi
|
|||||||
export TYPE=SPIGOT
|
export TYPE=SPIGOT
|
||||||
export SKIP_LOG4J_CONFIG=true
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
# Continue to Final Setup
|
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ if ! isTrue ${USE_MODPACK_START_SCRIPT:-true}; then
|
|||||||
mkdir -p ${FTB_BASE_DIR}
|
mkdir -p ${FTB_BASE_DIR}
|
||||||
unzip -o "${FTB_SERVER_MOD}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
|
unzip -o "${FTB_SERVER_MOD}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
|
||||||
|
|
||||||
serverJar=$(find ${FTB_BASE_DIR} -path "*/libraries/*" -prune -type f -o -not -name "forge*installer.jar" -name "forge*.jar")
|
SERVER=$(find ${FTB_BASE_DIR} -type f -not -name "forge*installer.jar" -name "forge*.jar")
|
||||||
if [[ -z "$serverJar" ]]; then
|
if [[ -z "$SERVER" ]]; then
|
||||||
|
|
||||||
if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then
|
if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then
|
||||||
loadForgeVars "${FTB_BASE_DIR}/settings.cfg"
|
loadForgeVars "${FTB_BASE_DIR}/settings.cfg"
|
||||||
@@ -89,14 +89,15 @@ if ! isTrue ${USE_MODPACK_START_SCRIPT:-true}; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${FTB_SERVER_MOD}" > $installMarker
|
echo "${FTB_SERVER_MOD}" > $installMarker
|
||||||
|
SERVER=$(find ${FTB_BASE_DIR} -type f -not -name "forge*installer.jar" -name "forge*.jar")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export SERVER=$(find ${FTB_BASE_DIR} -path "*/libraries/*" -prune -type f -o -not -name "forge*installer.jar" -name "forge*.jar")
|
|
||||||
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
||||||
log "ERROR unable to locate installed forge server jar"
|
log "ERROR unable to locate installed forge server jar"
|
||||||
isDebugging && find ${FTB_BASE_DIR} -name "forge*.jar"
|
isDebugging && find ${FTB_BASE_DIR} -name "forge*.jar"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
export SERVER
|
||||||
|
|
||||||
export FTB_DIR=$(dirname "${SERVER}")
|
export FTB_DIR=$(dirname "${SERVER}")
|
||||||
|
|
||||||
@@ -167,6 +168,16 @@ if [[ $startScriptCount = 0 ]]; then
|
|||||||
log "Unpacking FTB server modpack ${srv_modpack} ..."
|
log "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||||
mkdir -p ${FTB_BASE_DIR}
|
mkdir -p ${FTB_BASE_DIR}
|
||||||
unzip -o "${srv_modpack}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
|
unzip -o "${srv_modpack}" -d ${FTB_BASE_DIR} | awk '{printf "."} END {print ""}'
|
||||||
|
|
||||||
|
installScript=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f -name install.sh)
|
||||||
|
if [[ "$installScript" ]]; then
|
||||||
|
(
|
||||||
|
cd "$(dirname "${installScript}")"
|
||||||
|
chmod +x ./install.sh
|
||||||
|
log "Running included install.sh"
|
||||||
|
./install.sh
|
||||||
|
)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(find ${FTB_BASE_DIR} $entryScriptExpr | wc -l) = 0 ]]; then
|
if [[ $(find ${FTB_BASE_DIR} $entryScriptExpr | wc -l) = 0 ]]; then
|
||||||
|
|||||||
@@ -34,5 +34,4 @@ fi
|
|||||||
export TYPE=SPIGOT
|
export TYPE=SPIGOT
|
||||||
export SKIP_LOG4J_CONFIG=true
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
# Continue to Final Setup
|
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
|
||||||
|
|||||||
@@ -23,5 +23,4 @@ fi
|
|||||||
# Normalize on Spigot for later operations
|
# Normalize on Spigot for later operations
|
||||||
export TYPE=SPIGOT
|
export TYPE=SPIGOT
|
||||||
|
|
||||||
# Continue to Final Setup
|
exec ${SCRIPTS:-/}start-spiget "$@"
|
||||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ if isTrue "${REPLACE_ENV_VARIABLES}"; then
|
|||||||
$dirExcludes \
|
$dirExcludes \
|
||||||
-type f \
|
-type f \
|
||||||
\( -name "*.yml" -or -name "*.yaml" -or -name "*.txt" -or -name "*.cfg" \
|
\( -name "*.yml" -or -name "*.yaml" -or -name "*.txt" -or -name "*.cfg" \
|
||||||
-or -name "*.conf" -or -name "*.properties" \) \
|
-or -name "*.conf" -or -name "*.properties" -or -name "*.hjson" -or -name "*.json" \) \
|
||||||
$fileExcludes \
|
$fileExcludes \
|
||||||
-exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \;
|
-exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \;
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -11,21 +11,9 @@ fi
|
|||||||
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
|
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
|
||||||
|
|
||||||
# Remove old mods/plugins
|
# Remove old mods/plugins
|
||||||
if isTrue ${REMOVE_OLD_MODS}; then
|
if isTrue ${REMOVE_OLD_MODS:-false}; then
|
||||||
remove_mods_dest="/data/mods"
|
removeOldMods /data/mods
|
||||||
case ${TYPE} in
|
removeOldMods /data/plugins
|
||||||
SPIGOT|BUKKIT|PAPER)
|
|
||||||
remove_mods_dest="/data/plugins"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# only try to remove existing mods dir
|
|
||||||
if [ -d "$remove_mods_dest" ]; then
|
|
||||||
log "Removing old mods in $remove_mods_dest..."
|
|
||||||
find $remove_mods_dest -mindepth 1 -maxdepth ${REMOVE_OLD_MODS_DEPTH:-16} -wholename "${REMOVE_OLD_MODS_INCLUDE:-*}" -not -wholename "${REMOVE_OLD_MODS_EXCLUDE}" -delete
|
|
||||||
else
|
|
||||||
log "Directory $remove_mods_dest does not exist; removing nothing."
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If supplied with a URL for a modpack (simple zip of jars), download it and unpack
|
# If supplied with a URL for a modpack (simple zip of jars), download it and unpack
|
||||||
@@ -37,12 +25,12 @@ if [[ "$MODPACK" ]]; then
|
|||||||
downloadUrl=$(curl -Ls -o /dev/null -w %{effective_url} $MODPACK)
|
downloadUrl=$(curl -Ls -o /dev/null -w %{effective_url} $MODPACK)
|
||||||
if ! [[ $downloadUrl == *.zip ]]; then
|
if ! [[ $downloadUrl == *.zip ]]; then
|
||||||
log "ERROR Invalid URL given for MODPACK: $downloadUrl resolved from $MODPACK"
|
log "ERROR Invalid URL given for MODPACK: $downloadUrl resolved from $MODPACK"
|
||||||
log " Must be HTTP or HTTPS and a ZIP file"
|
log " Must be HTTP, HTTPS or FTP and a ZIP file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log "Downloading mod/plugin pack via HTTP"
|
log "Downloading mod/plugin pack"
|
||||||
log " from $downloadUrl ..."
|
log " from $downloadUrl ..."
|
||||||
if ! curl -sSL -o /tmp/modpack.zip "$downloadUrl"; then
|
if ! curl -sSL -o /tmp/modpack.zip "$downloadUrl"; then
|
||||||
log "ERROR: failed to download from $downloadUrl"
|
log "ERROR: failed to download from $downloadUrl"
|
||||||
|
|||||||
@@ -21,10 +21,12 @@ if [ -d /plugins ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If any modules have been provided, copy them over
|
# If any modules have been provided, copy them over
|
||||||
|
: ${COPY_MODS_DEST:="/data/mods"}
|
||||||
|
|
||||||
if [ -d /mods ]; then
|
if [ -d /mods ]; then
|
||||||
log "Copying any mods over..."
|
log "Copying any mods over..."
|
||||||
mkdir -p /data/mods
|
mkdir -p $COPY_MODS_DEST
|
||||||
rsync -a --out-format="update:%f:Last Modified %M" "${rsyncArgs[@]}" --prune-empty-dirs --update /mods /data
|
rsync -a --out-format="update:%f:Last Modified %M" "${rsyncArgs[@]}" --prune-empty-dirs --update /mods/ $COPY_MODS_DEST
|
||||||
fi
|
fi
|
||||||
|
|
||||||
: ${COPY_CONFIG_DEST:="/data/config"}
|
: ${COPY_CONFIG_DEST:="/data/config"}
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ function customizeServerProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Deploy server.properties file
|
# Deploy server.properties file
|
||||||
if [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
|
if [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||||
export SERVER_PROPERTIES=${FTB_DIR}/server.properties
|
export SERVER_PROPERTIES="${FTB_DIR}/server.properties"
|
||||||
log "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
log "detected FTB, changing properties path to ${SERVER_PROPERTIES}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ fi
|
|||||||
|
|
||||||
if isDebugging; then
|
if isDebugging; then
|
||||||
log "DEBUG Dumping server.properties"
|
log "DEBUG Dumping server.properties"
|
||||||
cat /data/server.properties
|
cat "${SERVER_PROPERTIES}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec ${SCRIPTS:-/}start-finalSetupEnvVariables $@
|
exec ${SCRIPTS:-/}start-finalSetupEnvVariables $@
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ isDebugging && set -x
|
|||||||
: ${LEVEL:=world}
|
: ${LEVEL:=world}
|
||||||
export LEVEL
|
export LEVEL
|
||||||
|
|
||||||
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
if [ $TYPE = "CURSEFORGE" ]; then
|
||||||
worldDest=$FTB_DIR/$LEVEL
|
worldDest=$FTB_DIR/$LEVEL
|
||||||
else
|
else
|
||||||
worldDest=/data/$LEVEL
|
worldDest=/data/$LEVEL
|
||||||
|
|||||||
@@ -144,6 +144,13 @@ if isTrue "${USE_LARGE_PAGES}"; then
|
|||||||
"
|
"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if isTrue "${USE_FLARE_FLAGS}"; then
|
||||||
|
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||||
|
-XX:+UnlockDiagnosticVMOptions
|
||||||
|
-XX:+DebugNonSafepoints
|
||||||
|
"
|
||||||
|
fi
|
||||||
|
|
||||||
if isTrue "${DEBUG_MEMORY}"; then
|
if isTrue "${DEBUG_MEMORY}"; then
|
||||||
log "Memory usage and availability (in MB)"
|
log "Memory usage and availability (in MB)"
|
||||||
uname -a
|
uname -a
|
||||||
|
|||||||
12
start-spiget
12
start-spiget
@@ -16,7 +16,7 @@ containsJars() {
|
|||||||
if [[ $line =~ $pat ]]; then
|
if [[ $line =~ $pat ]]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
done <<< $(unzip -l "$file")
|
done <<<$(unzip -l "$file")
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@@ -46,10 +46,14 @@ getResourceFromSpiget() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [[ ${SPIGET_RESOURCES} ]]; then
|
if [[ ${SPIGET_RESOURCES} ]]; then
|
||||||
|
if isTrue ${REMOVE_OLD_MODS:-false}; then
|
||||||
|
removeOldMods /data/plugins
|
||||||
|
REMOVE_OLD_MODS=false
|
||||||
|
fi
|
||||||
|
|
||||||
log "Getting plugins via Spiget"
|
log "Getting plugins via Spiget"
|
||||||
IFS=',' read -r -a resources <<< "${SPIGET_RESOURCES}"
|
IFS=',' read -r -a resources <<<"${SPIGET_RESOURCES}"
|
||||||
for resource in "${resources[@]}"
|
for resource in "${resources[@]}"; do
|
||||||
do
|
|
||||||
getResourceFromSpiget "${resource}"
|
getResourceFromSpiget "${resource}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function join_by() {
|
|||||||
function isURL() {
|
function isURL() {
|
||||||
local value=$1
|
local value=$1
|
||||||
|
|
||||||
if [[ ${value:0:8} == "https://" || ${value:0:7} == "http://" ]]; then
|
if [[ ${value:0:8} == "https://" || ${value:0:7} == "http://" || ${value:0:6} == "ftp://" ]]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
@@ -174,3 +174,9 @@ eula=${EULA,,}
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeOldMods {
|
||||||
|
if [ -d "$1" ]; then
|
||||||
|
find "$1" -mindepth 1 -maxdepth ${REMOVE_OLD_MODS_DEPTH:-16} -wholename "${REMOVE_OLD_MODS_INCLUDE:-*}" -not -wholename "${REMOVE_OLD_MODS_EXCLUDE}" -delete
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user