From 8a61cad71f0e36a81094bd4ccb527c5ed919f5c1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 21 Jun 2024 05:16:23 -0400 Subject: [PATCH] Update umami.sh add update path --- ct/umami.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/ct/umami.sh b/ct/umami.sh index 9f94d0b9..065f4516 100644 --- a/ct/umami.sh +++ b/ct/umami.sh @@ -52,6 +52,33 @@ function default_settings() { echo_default } +function update_script() { +header_info +if [[ ! -d /opt/umami ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi + +msg_info "Stopping ${APP}" +systemctl stop umami +msg_ok "Stopped $APP" + +msg_info "Updating ${APP}" +cd /opt/umami +git pull +yarn install +yarn build +msg_ok "Updated ${APP}" + +msg_info "Starting ${APP}" +systemctl start umami +msg_ok "Started ${APP}" + +msg_ok "Updated Successfully" +exit +} + start build_container description