Massive Update (Remove StorageCheck (old) + Add Ressource & StorageCheck, Remove Whiptail, Remove PCT Ressource Set

This commit is contained in:
CanbiZ 2024-11-18 13:58:55 +01:00
parent fb0706469b
commit deb239d8ca
172 changed files with 350 additions and 127 deletions

View file

@ -55,11 +55,9 @@ function default_settings() {
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bookstack ]]; 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
RELEASE=$(curl -s https://api.github.com/repos/BookStackApp/BookStack/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Apache2"