From 13450317bdaa25455279b9acdb31407183743813 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Mon, 17 Mar 2025 14:46:46 +0100 Subject: [PATCH] fixed file path --- ct/cryptpad.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/cryptpad.sh b/ct/cryptpad.sh index 9cb3738..1911e51 100644 --- a/ct/cryptpad.sh +++ b/ct/cryptpad.sh @@ -35,8 +35,11 @@ function update_script() { msg_ok "Stopped $APP" msg_info "Updating $APP to ${RELEASE}" + temp_dir=$(mktemp -d) + temp_file=$(mktemp) cp /opt/cryptpad/config/config.js /opt/config.js - wget -q "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -O $temp_file + wget -q "https://github.com/cryptpad/cryptpad/archive/refs/tags/${RELEASE}.tar.gz" -P $temp_dir -O $temp_file + cd $temp_dir tar zxf $temp_file cp -rf cryptpad-$RELEASE/* /opt/cryptpad cd /opt/cryptpad @@ -47,7 +50,7 @@ function update_script() { msg_ok "Updated $APP to ${RELEASE}" msg_info "Cleaning Up" - rm -f $temp_file + rm -rf $temp_dir msg_ok "Cleanup Completed" msg_info "Starting $APP"