mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 14:24:28 +00:00
Support FTP servers for file downloads (#850)
This commit is contained in:
parent
7164d2b885
commit
3261fbd7e9
2 changed files with 3 additions and 3 deletions
|
@ -25,12 +25,12 @@ if [[ "$MODPACK" ]]; then
|
|||
downloadUrl=$(curl -Ls -o /dev/null -w %{effective_url} $MODPACK)
|
||||
if ! [[ $downloadUrl == *.zip ]]; then
|
||||
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
|
||||
fi
|
||||
fi
|
||||
|
||||
log "Downloading mod/plugin pack via HTTP"
|
||||
log "Downloading mod/plugin pack"
|
||||
log " from $downloadUrl ..."
|
||||
if ! curl -sSL -o /tmp/modpack.zip "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl"
|
||||
|
|
|
@ -11,7 +11,7 @@ function join_by() {
|
|||
function isURL() {
|
||||
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
|
||||
else
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue