Remove comments

This commit is contained in:
Frans Stofberg
2025-11-02 09:41:02 +02:00
parent 67927b2a89
commit 86028cc640
4 changed files with 6 additions and 20 deletions

View File

@@ -5,7 +5,6 @@ source <(curl -fsSL https://raw.githubusercontent.com/fstof/ProxmoxVED/refs/head
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/donetick/donetick
# App Default Values
APP="donetick"
var_tags="${var_tags:-productivity;tasks}"
var_cpu="${var_cpu:-2}"
@@ -25,43 +24,34 @@ function update_script() {
check_container_storage
check_container_resources
# Check if installation is present | -f for file, -d for folder
if [[ ! -f /opt/donetick ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
# Crawling the new version and checking whether an update is required
RELEASE=$(curl -fsSL https://api.github.com/repos/donetick/donetick/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/donetick/donetick_version.txt)" ]] || [[ ! -f /opt/donetick/donetick_version.txt ]]; then
# Stopping Services
msg_info "Stopping $APP"
systemctl stop donetick
msg_ok "Stopped $APP"
# Execute Update
msg_info "Updating $APP to ${RELEASE}"
cd /opt/donetick
wget -q https://github.com/donetick/donetick/releases/download/${RELEASE}/donetick_Linux_x86_64.tar.gz
tar -xf donetick_Linux_x86_64.tar.gz
rm -rf /opt/donetick/donetick_Linux_x86_64.tar.gz
mv donetick /opt/donetick/donetick
msg_ok "Updated $APP to ${RELEASE}"
# Starting Services
msg_info "Starting $APP"
systemctl start donetick
msg_ok "Started $APP"
# Cleaning up
msg_info "Cleaning Up"
rm -rf donetick_Linux_x86_64.tar.gz
rm -rf config
msg_ok "Cleanup Completed"
# Last Action
echo "${RELEASE}" > /opt/donetick/donetick_version.txt
msg_ok "Update Successful"
else