Compare commits

..

1 Commits

Author SHA1 Message Date
f8c82f87a9 Update versions.json 2025-12-21 12:06:20 +00:00
3 changed files with 25 additions and 8 deletions

View File

@ -18,10 +18,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- Typo fix in Heimdall install script [@Turcid-uwu](https://github.com/Turcid-uwu) ([#10187](https://github.com/community-scripts/ProxmoxVE/pull/10187)) - Typo fix in Heimdall install script [@Turcid-uwu](https://github.com/Turcid-uwu) ([#10187](https://github.com/community-scripts/ProxmoxVE/pull/10187))
- #### 🔧 Refactor
- Refactor: Backrest [@tremor021](https://github.com/tremor021) ([#10193](https://github.com/community-scripts/ProxmoxVE/pull/10193))
### 🧰 Tools ### 🧰 Tools
- pihole-exporter ([#10091](https://github.com/community-scripts/ProxmoxVE/pull/10091)) - pihole-exporter ([#10091](https://github.com/community-scripts/ProxmoxVE/pull/10091))

View File

@ -27,18 +27,28 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if check_for_gh_release "backrest" "garethgeorge/backrest"; then if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop backrest systemctl stop backrest
msg_ok "Stopped Service" msg_ok "Stopped Service"
fetch_and_deploy_gh_release "backrest" "garethgeorge/backrest" "prebuild" "latest" "/opt/backrest/bin" "backrest_Linux_x86_64.tar.gz" msg_info "Updating ${APP} to ${RELEASE}"
temp_file=$(mktemp)
rm -f /opt/backrest/bin/backrest
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "$temp_file"
tar xzf $temp_file -C /opt/backrest/bin
chmod +x /opt/backrest/bin/backrest
rm -f "$temp_file"
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start backrest systemctl start backrest
msg_ok "Started Service" msg_ok "Started Service"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi fi
exit exit
} }

View File

@ -13,7 +13,16 @@ setting_up_container
network_check network_check
update_os update_os
fetch_and_deploy_gh_release "backrest" "garethgeorge/backrest" "prebuild" "latest" "/opt/backrest/bin" "backrest_Linux_x86_64.tar.gz" msg_info "Installing Backrest"
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
temp_file=$(mktemp)
mkdir -p /opt/backrest/{bin,config,data}
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "$temp_file"
tar xzf $temp_file -C /opt/backrest/bin
chmod +x /opt/backrest/bin/backrest
rm -f "$temp_file"
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Backrest"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/backrest.service cat <<EOF >/etc/systemd/system/backrest.service
@ -23,6 +32,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
User=root
ExecStart=/opt/backrest/bin/backrest ExecStart=/opt/backrest/bin/backrest
Environment="BACKREST_PORT=9898" Environment="BACKREST_PORT=9898"
Environment="BACKREST_CONFIG=/opt/backrest/config/config.json" Environment="BACKREST_CONFIG=/opt/backrest/config/config.json"
@ -38,3 +48,4 @@ msg_ok "Created Service"
motd_ssh motd_ssh
customize customize
cleanup_lxc cleanup_lxc