Update umami.sh

add update path
This commit is contained in:
tteckster 2024-06-21 05:16:23 -04:00 committed by GitHub
parent 53b24ef7b7
commit 8a61cad71f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 27 additions and 0 deletions

View File

@ -52,6 +52,33 @@ function default_settings() {
echo_default 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? <y/N> " 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 start
build_container build_container
description description