Update alpine-rclone

This commit is contained in:
tremor021 2025-04-28 20:50:19 +02:00
parent 3691988549
commit a89e2b2fcc
3 changed files with 8 additions and 8 deletions

View File

@ -30,12 +30,13 @@ function update_script() {
fi fi
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -f /opt/${APP}_version.txt ]; then if [ "${RELEASE}" != "$(cat /opt/rclone_version.txt)" ] || [ ! -f /opt/rclone_version.txt ]; then
msg_info "Updating ${APP} LXC" msg_info "Updating ${APP} LXC"
temp_file=$(mktemp) temp_file=$(mktemp)
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file" 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 $STD unzip -o "$temp_file" '*/**' -d /opt/rclone
rm -f "$temp_file" rm -f "$temp_file"
echo "${RELEASE}" >/opt/rclone_version.txt
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
else else
msg_ok "No update required. ${APP} is already at ${RELEASE}" msg_ok "No update required. ${APP} is already at ${RELEASE}"

View File

@ -2,9 +2,9 @@
"name": "Alpine-rclone", "name": "Alpine-rclone",
"slug": "alpine-rclone", "slug": "alpine-rclone",
"categories": [ "categories": [
20 11
], ],
"date_created": "2025-04-11", "date_created": "2025-04-28",
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
@ -12,7 +12,7 @@
"documentation": "https://rclone.org/docs/", "documentation": "https://rclone.org/docs/",
"website": "https://rclone.org/", "website": "https://rclone.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg",
"config_path": "", "config_path": "~/.config/rclone/rclone.conf",
"description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces", "description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces",
"install_methods": [ "install_methods": [
{ {
@ -21,7 +21,7 @@
"resources": { "resources": {
"cpu": 1, "cpu": 1,
"ram": 256, "ram": 256,
"hdd": 0.2, "hdd": 1,
"os": "alpine", "os": "alpine",
"version": "3.21" "version": "3.21"
} }
@ -32,7 +32,7 @@
"resources": { "resources": {
"cpu": 1, "cpu": 1,
"ram": 256, "ram": 256,
"hdd": 0.2, "hdd": 1,
"os": "alpine", "os": "alpine",
"version": "3.21" "version": "3.21"
} }
@ -53,4 +53,3 @@
} }
] ]
} }

View File

@ -33,7 +33,7 @@ $STD htpasswd -cb -B login.pwd admin "$RCLONE_PASSWORD"
echo "rclone User Name: admin" echo "rclone User Name: admin"
echo "rclone Password: $RCLONE_PASSWORD" echo "rclone Password: $RCLONE_PASSWORD"
} >>~/rclone.creds } >>~/rclone.creds
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt echo "${RELEASE}" >/opt/rclone_version.txt
rm -f "$temp_file" rm -f "$temp_file"
msg_ok "Installed rclone" msg_ok "Installed rclone"