Update rclone

This commit is contained in:
tremor021 2025-04-10 23:59:54 +02:00
parent 05bf942d50
commit 893b6865db

View File

@ -24,10 +24,10 @@ 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
unzip -j $temp_file '*/**' -d /opt/rclone
$STD unzip -j $temp_file '*/**' -d /opt/rclone
cd /opt/rclone
PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16)
htpasswd -cb -B login.pwd admin $PASSWORD
$STD htpasswd -cb -B login.pwd admin $PASSWORD
{
echo "rclone-Credentials"
echo "rclone User Name: admin"
@ -43,6 +43,7 @@ cat <<EOF >/etc/init.d/rclone
description="rclone Service"
command="/opt/rclone/rclone"
command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd"
command_background="yes"
command_user="root"
pidfile="/var/run/rclone.pid"