mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-16 21:44:56 +02:00
Compare commits
1 Commits
2026-05-15
...
fix/opnsen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0aaa8800f5 |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -461,29 +461,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-05-15
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- OPNsense: replace undefined msg_warn with inline echo in alloc retry [@MickLesk](https://github.com/MickLesk) ([#14500](https://github.com/community-scripts/ProxmoxVE/pull/14500))
|
||||
- Checkmk: detect OMD version suffix dynamically on update [@MickLesk](https://github.com/MickLesk) ([#14496](https://github.com/community-scripts/ProxmoxVE/pull/14496))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- SearXNG: enable JSON format by default for API integrations [@MickLesk](https://github.com/MickLesk) ([#14498](https://github.com/community-scripts/ProxmoxVE/pull/14498))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Refactor: Ollama use tools.func [@MickLesk](https://github.com/MickLesk) ([#14501](https://github.com/community-scripts/ProxmoxVE/pull/14501))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: fall back to silent mode when no TTY or whiptail unavailable [@MickLesk](https://github.com/MickLesk) ([#14497](https://github.com/community-scripts/ProxmoxVE/pull/14497))
|
||||
|
||||
## 2026-05-14
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
@@ -35,12 +35,7 @@ function update_script() {
|
||||
$STD omd cp monitoring monitoringbackup
|
||||
curl_with_retry "https://download.checkmk.com/checkmk/${RELEASE}/check-mk-community-${RELEASE}_0.$(get_os_info codename)_amd64.deb" "/opt/checkmk.deb"
|
||||
$STD apt install -y /opt/checkmk.deb
|
||||
OMD_VERSION=$(omd versions 2>/dev/null | grep "^${RELEASE}" | awk '{print $1}')
|
||||
if [[ -z "${OMD_VERSION}" ]]; then
|
||||
msg_error "Could not find installed OMD version for release ${RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
$STD omd --force -V "${OMD_VERSION}" update --conflict=install monitoring
|
||||
$STD omd --force -V ${RELEASE}.cre update --conflict=install monitoring
|
||||
$STD omd start monitoring
|
||||
$STD omd -f rm monitoringbackup
|
||||
$STD omd cleanup
|
||||
|
||||
28
ct/ollama.sh
28
ct/ollama.sh
@@ -27,26 +27,34 @@ function update_script() {
|
||||
msg_error "No Ollama Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
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
|
||||
fi
|
||||
ensure_dependencies zstd
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop ollama
|
||||
msg_ok "Services Stopped"
|
||||
|
||||
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
|
||||
rm -rf "$OLLAMA_INSTALL_DIR" /usr/local/bin/ollama
|
||||
mkdir -p "$OLLAMA_INSTALL_DIR"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Download or deployment failed – check network connectivity and GitHub API availability"
|
||||
exit 250
|
||||
fi
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" /usr/local/bin/ollama
|
||||
msg_ok "Updated Ollama"
|
||||
TMP_TAR=$(mktemp --suffix=.tar.zst)
|
||||
curl -fL# -C - -o "${TMP_TAR}" "https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tar.zst"
|
||||
msg_info "Updating Ollama to ${RELEASE}"
|
||||
rm -rf /usr/local/lib/ollama
|
||||
rm -rf /usr/local/bin/ollama
|
||||
mkdir -p /usr/local/lib/ollama
|
||||
tar --zstd -xf "${TMP_TAR}" -C /usr/local/lib/ollama
|
||||
ln -sf /usr/local/lib/ollama/bin/ollama /usr/local/bin/ollama
|
||||
rm -f "${TMP_TAR}"
|
||||
echo "${RELEASE}" >/opt/Ollama_version.txt
|
||||
msg_ok "Updated Ollama to ${RELEASE}"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
else
|
||||
msg_ok "No update required. Ollama is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
@@ -91,22 +91,37 @@ EOF
|
||||
|
||||
if [ -x "/usr/bin/ollama" ]; then
|
||||
msg_info "Checking for Ollama Update"
|
||||
if check_for_gh_release "ollama" "ollama/ollama"; then
|
||||
msg_info "Stopping Ollama Service"
|
||||
systemctl stop ollama
|
||||
msg_ok "Stopped Service"
|
||||
OLLAMA_VERSION=$(ollama -v | awk '{print $NF}')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4)}')
|
||||
if [ "$OLLAMA_VERSION" != "$RELEASE" ]; then
|
||||
msg_info "Ollama update available: v$OLLAMA_VERSION -> v$RELEASE"
|
||||
msg_info "Downloading Ollama v$RELEASE \n"
|
||||
curl -fS#LO https://github.com/ollama/ollama/releases/download/v${RELEASE}/ollama-linux-amd64.tar.zst
|
||||
msg_ok "Download Complete"
|
||||
|
||||
rm -rf /usr/lib/ollama /usr/bin/ollama
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Ollama download or deployment failed – check network connectivity and GitHub API availability"
|
||||
if [ -f "ollama-linux-amd64.tar.zst" ]; then
|
||||
|
||||
msg_info "Stopping Ollama Service"
|
||||
systemctl stop ollama
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Installing Ollama"
|
||||
rm -rf /usr/lib/ollama
|
||||
rm -rf /usr/bin/ollama
|
||||
tar --zstd -C /usr -xf ollama-linux-amd64.tar.zst
|
||||
rm -rf ollama-linux-amd64.tar.zst
|
||||
msg_ok "Installed Ollama"
|
||||
|
||||
msg_info "Starting Ollama Service"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Service"
|
||||
|
||||
msg_ok "Ollama updated to version $RELEASE"
|
||||
else
|
||||
ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama
|
||||
msg_ok "Updated Ollama to ${CHECK_UPDATE_RELEASE}"
|
||||
msg_error "Ollama download failed. Aborting update."
|
||||
fi
|
||||
|
||||
msg_info "Starting Ollama Service"
|
||||
systemctl start ollama
|
||||
msg_ok "Started Service"
|
||||
else
|
||||
msg_ok "Ollama is already up to date."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -62,15 +62,26 @@ $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 | grep "tag_name" | awk -F '"' '{print $4}')
|
||||
OLLAMA_INSTALL_DIR="/usr/local/lib/ollama"
|
||||
BINDIR="/usr/local/bin"
|
||||
mkdir -p "$OLLAMA_INSTALL_DIR"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
||||
mkdir -p $OLLAMA_INSTALL_DIR
|
||||
OLLAMA_URL="https://github.com/ollama/ollama/releases/download/${RELEASE}/ollama-linux-amd64.tar.zst"
|
||||
TMP_TAR="/tmp/ollama.tar.zst"
|
||||
echo -e "\n"
|
||||
if curl -fL# -C - -o "$TMP_TAR" "$OLLAMA_URL"; then
|
||||
if tar --zstd -xf "$TMP_TAR" -C "$OLLAMA_INSTALL_DIR"; then
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
||||
echo "${RELEASE}" >/opt/Ollama_version.txt
|
||||
msg_ok "Installed Ollama ${RELEASE}"
|
||||
else
|
||||
msg_error "Extraction failed – archive corrupt or incomplete"
|
||||
exit 251
|
||||
fi
|
||||
else
|
||||
msg_error "Download failed – $OLLAMA_URL not reachable"
|
||||
exit 250
|
||||
fi
|
||||
ln -sf "$OLLAMA_INSTALL_DIR/bin/ollama" "$BINDIR/ollama"
|
||||
msg_ok "Installed Ollama"
|
||||
|
||||
msg_info "Creating ollama User and Group"
|
||||
if ! id ollama >/dev/null 2>&1; then
|
||||
|
||||
@@ -73,11 +73,11 @@ EOF
|
||||
msg_ok "Installed Intel® oneAPI Base Toolkit"
|
||||
|
||||
msg_info "Installing Ollama"
|
||||
if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then
|
||||
msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability"
|
||||
else
|
||||
ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama
|
||||
cat <<EOF >/etc/systemd/system/ollama.service
|
||||
OLLAMA_RELEASE=$(curl -fsSL https://api.github.com/repos/ollama/ollama/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
||||
curl -fsSLO -C - https://github.com/ollama/ollama/releases/download/${OLLAMA_RELEASE}/ollama-linux-amd64.tar.zst
|
||||
tar --zstd -C /usr -xf ollama-linux-amd64.tar.zst
|
||||
rm -rf ollama-linux-amd64.tar.zst
|
||||
cat <<EOF >/etc/systemd/system/ollama.service
|
||||
[Unit]
|
||||
Description=Ollama Service
|
||||
After=network-online.target
|
||||
@@ -93,10 +93,9 @@ RestartSec=3
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now ollama
|
||||
echo "ENABLE_OLLAMA_API=true" >/root/.env
|
||||
msg_ok "Installed Ollama"
|
||||
fi
|
||||
systemctl enable -q --now ollama
|
||||
echo "ENABLE_OLLAMA_API=true" >/root/.env
|
||||
msg_ok "Installed Ollama"
|
||||
fi
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
@@ -75,9 +75,6 @@ enabled_plugins:
|
||||
search:
|
||||
safe_search: 2
|
||||
autocomplete: 'google'
|
||||
formats:
|
||||
- html
|
||||
- json
|
||||
engines:
|
||||
- name: google
|
||||
engine: google
|
||||
|
||||
@@ -3649,16 +3649,6 @@ 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:" \
|
||||
|
||||
Reference in New Issue
Block a user