Compare commits

...

5 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
05ec444e2d Update CHANGELOG.md (#1951)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-02 20:23:51 +01:00
Andy Grunwald
19911f5b81 Prometheus PVE Exporter: Add --default-timeout=300 to pip install commands (#1950) 2025-02-02 20:18:52 +01:00
Andy Grunwald
57b37b1e16 VSCode: Add Shellscript Syntax highlighting for *.func files (#1948) 2025-02-02 20:05:36 +01:00
community-scripts-pr-app[bot]
91a3fd10e0 Update CHANGELOG.md (#1939)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-02 12:57:10 +01:00
CanbiZ
6f0ebac209 fix z2m update function to 2.1.0 (#1938) 2025-02-02 12:47:34 +01:00
5 changed files with 42 additions and 15 deletions

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"files.associations": {
"*.func": "shellscript"
}
}

View File

@@ -17,6 +17,19 @@ All LXC instances created using this repository come pre-installed with Midnight
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2025-02-02
### Changed
### 🚀 Updated Scripts
- Prometheus PVE Exporter: Add `--default-timeout=300` to pip install commands [@andygrunwald](https://github.com/andygrunwald) ([#1950](https://github.com/community-scripts/ProxmoxVE/pull/1950))
- fix z2m update function to 2.1.0 [@MickLesk](https://github.com/MickLesk) ([#1938](https://github.com/community-scripts/ProxmoxVE/pull/1938))
### 🧰 Maintenance
- VSCode: Add Shellscript Syntax highlighting for *.func files [@andygrunwald](https://github.com/andygrunwald) ([#1948](https://github.com/community-scripts/ProxmoxVE/pull/1948))
## 2025-02-01
### Changed

View File

@@ -37,7 +37,7 @@ function update_script() {
msg_ok "Stopped ${APP}"
msg_info "Updating ${APP}"
pip install prometheus-pve-exporter --upgrade --root-user-action=ignore &>/dev/null
pip install prometheus-pve-exporter --default-timeout=300 --upgrade --root-user-action=ignore &>/dev/null
msg_ok "Updated ${APP}"
msg_info "Starting ${APP}"

View File

@@ -39,24 +39,33 @@ function update_script() {
msg_ok "Stopped Service"
msg_info "Creating Backup"
mkdir -p /opt/z2m_backup
tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt &>/dev/null
mv /opt/zigbee2mqtt/data /opt/z2m_backup
rm -rf /opt/${APP}_backup*.tar.gz
mkdir -p /opt/z2m_backup
tar -czf /opt/z2m_backup/${APP}_backup_$(date +%Y%m%d%H%M%S).tar.gz -C /opt zigbee2mqtt &>/dev/null
mv /opt/zigbee2mqtt/data /opt/z2m_backup
msg_ok "Backup Created"
msg_info "Updating ${APP} to v${RELEASE}"
cd /opt
wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt
rm -rf /opt/zigbee2mqtt/data
mv /opt/z2m_backup/data /opt/zigbee2mqtt
cd /opt/zigbee2mqtt
pnpm install --frozen-lockfile &>/dev/null
pnpm build &>/dev/null
cd /opt
wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
rm -rf /opt/zigbee2mqtt
mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt
rm -rf /opt/zigbee2mqtt/data
mv /opt/z2m_backup/data /opt/zigbee2mqtt
cd /opt/zigbee2mqtt
pnpm install --frozen-lockfile &>/dev/null
pnpm build &>/dev/null
msg_ok "Updated Zigbee2MQTT"
msg_info "Starting Service"
systemctl start zigbee2mqtt
systemctl start zigbee2mqtt
msg_ok "Started Service"
msg_info "Cleaning up"
rm -rf /opt/z2m_backup
rm -rf /opt/${RELEASE}.zip
msg_ok "Cleaned up"
echo "${RELEASE}" >/opt/${APP}_version.txt
else
msg_ok "No update required. ${APP} is already at v${RELEASE}."

View File

@@ -28,7 +28,7 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Setup Python3"
msg_info "Installing Prometheus Proxmox VE Exporter"
python3 -m pip install --quiet --root-user-action=ignore prometheus-pve-exporter
python3 -m pip install --default-timeout=300 --quiet --root-user-action=ignore prometheus-pve-exporter
mkdir -p /opt/prometheus-pve-exporter
cat <<EOF > /opt/prometheus-pve-exporter/pve.yml
default: