From fcf4d69e7270924e516484d5fce07537419f4d85 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Sun, 12 Aug 2012 02:45:15 +0100 Subject: [PATCH] Don't download files as root user, so deletion is easier --- init/msm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/init/msm b/init/msm index 07c82d9..27d8c8e 100755 --- a/init/msm +++ b/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)