Compare commits

..

1 Commits

Author SHA1 Message Date
MickLesk
bef4f3f9b3 build.func: fall back to silent mode when no TTY or whiptail unavailable 2026-05-15 21:27:21 +02:00
3 changed files with 12 additions and 10 deletions

View File

@@ -27,11 +27,7 @@ function update_script() {
msg_error "No Ollama Installation Found!"
exit
fi
RELEASE=$(curl -fsSL "https://api.github.com/repos/ollama/ollama/releases/latest" | sed -n 's/.*"tag_name" *: *"\([^"]*\)".*/\1/p' | head -1)
if [[ -z "${RELEASE}" || ! "${RELEASE}" =~ ^v[0-9] ]]; then
msg_error "Failed to determine latest Ollama version"
exit 1
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
if [[ ! -f /opt/Ollama_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/Ollama_version.txt)" ]]; then
if [[ ! -f /opt/Ollama_version.txt ]]; then
touch /opt/Ollama_version.txt

View File

@@ -62,11 +62,7 @@ $STD apt install -y --no-install-recommends intel-basekit-2024.1
msg_ok "Installed Intel® oneAPI Base Toolkit"
msg_info "Installing Ollama (Patience)"
RELEASE=$(curl -fsSL "https://api.github.com/repos/ollama/ollama/releases/latest" | sed -n 's/.*"tag_name" *: *"\([^"]*\)".*/\1/p' | head -1)
if [[ -z "${RELEASE}" || ! "${RELEASE}" =~ ^v[0-9] ]]; then
msg_error "Failed to determine latest Ollama version"
exit 1
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
BINDIR="/usr/local/bin"
mkdir -p $OLLAMA_INSTALL_DIR

View File

@@ -3649,6 +3649,16 @@ start() {
run_addon_updates
update_motd_ip
cleanup_lxc
elif ! command -v whiptail &>/dev/null || ! [ -t 0 ]; then
msg_info "No interactive terminal detected defaulting to silent update mode"
VERBOSE="no"
set_std_mode
ensure_profile_loaded
get_lxc_ip
update_script
run_addon_updates
update_motd_ip
cleanup_lxc
else
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
"Support/Update functions for ${APP} LXC. Choose an option:" \