From ee3b69fffecc0f7b6c311ec978cbd084448c418e Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 7 Feb 2024 05:56:22 -0500 Subject: [PATCH] Update readeck.sh create update path --- ct/readeck.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ct/readeck.sh b/ct/readeck.sh index 70a014c0..1c01b161 100644 --- a/ct/readeck.sh +++ b/ct/readeck.sh @@ -55,7 +55,16 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/readeck ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating ${APP}" +LATEST=$(curl -s https://codeberg.org/readeck/readeck/releases/ | grep -oP '(?<=Version )\d+\.\d+\.\d+' | head -1 +) +systemctl stop readeck.service +rm -rf /opt/readeck/readeck +cd /opt/readeck +wget -q -O readeck https://codeberg.org/readeck/readeck/releases/download/${LATEST}/readeck-${LATEST}-linux-amd64 +chmod a+x readeck +systemctl start readeck.service +msg_ok "Updated ${APP}" exit }