mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Added check for wget --trust-server-names option.
This commit is contained in:
parent
58378250cf
commit
0b8328b3fe
8
init/msm
8
init/msm
@ -1010,7 +1010,13 @@ jargroup_getlatest() {
|
||||
error_exit FILE_NOT_FOUND "$error"
|
||||
fi
|
||||
|
||||
as_user "$SETTINGS_USERNAME" "wget --quiet --trust-server-names --no-check-certificate --input-file='$SETTINGS_JAR_STORAGE_PATH/$1/$SETTINGS_JARGROUP_TARGET' --directory-prefix='$SETTINGS_JAR_STORAGE_PATH/$1/$SETTINGS_JARGROUP_DOWNLOAD_DIR'"
|
||||
# test wget for --trust-server-names option
|
||||
local wget_opts="--trust-server-names"
|
||||
wget $wget_opts >/dev/null 2>&1
|
||||
if [[ $? != 1 ]]; then
|
||||
wget_opts=""
|
||||
fi
|
||||
as_user "$SETTINGS_USERNAME" "wget --quiet $wget_opts --no-check-certificate --input-file='$SETTINGS_JAR_STORAGE_PATH/$1/$SETTINGS_JARGROUP_TARGET' --directory-prefix='$SETTINGS_JAR_STORAGE_PATH/$1/$SETTINGS_JARGROUP_DOWNLOAD_DIR'"
|
||||
echo "Done."
|
||||
|
||||
local num_files="$(as_user "$SETTINGS_USERNAME" "ls -1 '$SETTINGS_JAR_STORAGE_PATH/$1/$SETTINGS_JARGROUP_DOWNLOAD_DIR' | wc -l")"
|
||||
|
Loading…
Reference in New Issue
Block a user