From c870b93810a13be3b328a192f6f2a7c82620db94 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 22 Nov 2023 09:34:09 -0500 Subject: [PATCH] Update linkwarden.sh - create update path --- ct/linkwarden.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ct/linkwarden.sh b/ct/linkwarden.sh index fb2a8d01..70bf88e8 100644 --- a/ct/linkwarden.sh +++ b/ct/linkwarden.sh @@ -53,7 +53,21 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/linkwarden ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." +msg_info "Updating $APP" +systemctl stop linkwarden +cd /opt/linkwarden +if git pull | grep 'Already up to date'; then + echo "Exiting script." + systemctl start linkwarden + exit +fi +git pull +yarn +npx playwright install-deps +yarn build +yarn prisma migrate deploy +systemctl start linkwarden +msg_ok "Updated $APP" exit }