mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Don't download files as root user, so deletion is easier
This commit is contained in:
parent
2534d2e89b
commit
fcf4d69e72
5
init/msm
5
init/msm
@ -1993,9 +1993,8 @@ command_update() {
|
||||
# $1: The file name to download
|
||||
download_file() {
|
||||
local dir_name="$(dirname "${output_dir}/${1}")"
|
||||
as_user "root" "mkdir -p \"${dir_name}\""
|
||||
as_user "root" "chown ${SETTINGS_USERNAME}:${SETTINGS_USERNAME} \"${dir_name}\""
|
||||
as_user "root" "wget --quiet --trust-server-names --no-check-certificate ${SETTINGS_UPDATE_URL}/$1 -O ${output_dir}/$1"
|
||||
as_user "${SETTINGS_USERNAME}" "mkdir -p \"${dir_name}\""
|
||||
as_user "${SETTINGS_USERNAME}" "wget --quiet --no-check-certificate ${SETTINGS_UPDATE_URL}/$1 -O ${output_dir}/$1"
|
||||
}
|
||||
|
||||
# $1: The newly download file (relative to download dir)
|
||||
|
Loading…
Reference in New Issue
Block a user