From 56fd53649ad72d07a06d13d86bc47ef23424d2a1 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Wed, 23 Apr 2025 19:38:11 +0200 Subject: [PATCH] Update alpine-rclone --- ct/alpine-rclone.sh | 4 ++-- install/alpine-rclone-install.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ct/alpine-rclone.sh b/ct/alpine-rclone.sh index d6fd160..d5cc8f7 100644 --- a/ct/alpine-rclone.sh +++ b/ct/alpine-rclone.sh @@ -33,8 +33,8 @@ function update_script() { if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then msg_info "Updating ${APP} LXC" temp_file=$(mktemp) - curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file - $STD unzip -o $temp_file '*/**' -d /opt/rclone + curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" + $STD unzip -o "$temp_file" '*/**' -d /opt/rclone msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}" diff --git a/install/alpine-rclone-install.sh b/install/alpine-rclone-install.sh index ee7044b..ddcec77 100644 --- a/install/alpine-rclone-install.sh +++ b/install/alpine-rclone-install.sh @@ -23,18 +23,18 @@ msg_info "Installing rclone" temp_file=$(mktemp) mkdir -p /opt/rclone RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o $temp_file -$STD unzip -j $temp_file '*/**' -d /opt/rclone +curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" +$STD unzip -j "$temp_file" '*/**' -d /opt/rclone cd /opt/rclone PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16) -$STD htpasswd -cb -B login.pwd admin $PASSWORD +$STD htpasswd -cb -B login.pwd admin "$PASSWORD" { echo "rclone-Credentials" echo "rclone User Name: admin" echo "rclone Password: $PASSWORD" } >>~/rclone.creds -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt -rm -f $temp_file +echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt +rm -f "$temp_file" msg_ok "Installed rclone" msg_info "Enabling rclone Service"