2023-03-01 20:27:47 +01:00
|
|
|
#!/usr/bin/env bash
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
# Usage: ./script.sh <SearchName>
|
|
|
|
|
|
2023-03-01 20:27:47 +01:00
|
|
|
SearchName="$1"
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
|
|
|
|
# Iterate over containers whose name contains the search term.
|
|
|
|
|
podman ps --filter "name=$SearchName" --format '{{.Names}}' | while read -r container; do
|
|
|
|
|
echo "------------ $container ------------"
|
|
|
|
|
|
|
|
|
|
# Retrieve container labels and image name.
|
|
|
|
|
ContLabels=$(podman inspect "$container" --format '{{json .Config.Labels}}')
|
|
|
|
|
ContImage=$(podman inspect "$container" --format '{{.ImageName}}')
|
|
|
|
|
|
|
|
|
|
# Extract values from labels; if not set, default to an empty string.
|
2024-11-19 21:00:07 +01:00
|
|
|
ContPath=$(jq -r '."com.docker.compose.project.working_dir"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContPath" == "null" ] && ContPath=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
2024-11-19 21:00:07 +01:00
|
|
|
ContConfigFile=$(jq -r '."com.docker.compose.project.config_files"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContConfigFile" == "null" ] && ContConfigFile=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
2024-11-19 21:00:07 +01:00
|
|
|
ContName=$(jq -r '."com.docker.compose.service"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContName" == "null" ] && ContName=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
2024-11-19 21:00:07 +01:00
|
|
|
ContEnv=$(jq -r '."com.docker.compose.project.environment_file"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContEnv" == "null" ] && ContEnv=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
2024-11-19 21:00:07 +01:00
|
|
|
ContUpdateLabel=$(jq -r '."sudo-kraken.podcheck.update"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContUpdateLabel" == "null" ] && ContUpdateLabel=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
2024-11-19 21:00:07 +01:00
|
|
|
ContRestartStack=$(jq -r '."sudo-kraken.podcheck.restart-stack"' <<< "$ContLabels")
|
|
|
|
|
[ "$ContRestartStack" == "null" ] && ContRestartStack=""
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
|
|
|
|
# Determine the compose file location.
|
|
|
|
|
if [[ $ContConfigFile = '/'* ]]; then
|
2023-03-01 20:27:47 +01:00
|
|
|
ComposeFile="$ContConfigFile"
|
|
|
|
|
else
|
|
|
|
|
ComposeFile="$ContPath/$ContConfigFile"
|
|
|
|
|
fi
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
|
|
|
|
# Output the extracted details.
|
2023-03-01 20:27:47 +01:00
|
|
|
echo -e "Service name:\t\t$ContName"
|
|
|
|
|
echo -e "Project working dir:\t$ContPath"
|
|
|
|
|
echo -e "Compose files:\t\t$ComposeFile"
|
2023-03-05 21:13:23 +01:00
|
|
|
echo -e "Environment files:\t$ContEnv"
|
2023-03-01 20:27:47 +01:00
|
|
|
echo -e "Container image:\t$ContImage"
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
echo -e "Update label:\t\t$ContUpdateLabel"
|
2024-11-19 21:00:07 +01:00
|
|
|
echo -e "Restart Stack label:\t$ContRestartStack"
|
2023-03-01 20:27:47 +01:00
|
|
|
echo
|
|
|
|
|
echo "Mounts:"
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|
|
|
|
|
# Display container mount points.
|
|
|
|
|
podman inspect -f '{{ range .Mounts }}{{ .Source }}:{{ .Destination }}{{ "\n" }}{{ end }}' "$container"
|
2023-03-01 20:27:47 +01:00
|
|
|
echo
|
|
|
|
|
done
|
Upstream patches and additional patching (#2)
* Ensures DSM GUI refreshes its updates
* Removed whale icon and changed verbosity
* Added addon for Prometheus+node_exporter
* Changed local image check to check on image ID rather than name
* Update podcheck.sh
changed docker->podman, typo
* - **v0.6.0**:
- **Grafana & Prometheus Integration:**
- Added a detailed Prometheus metrics exporter that now reports not only the number of containers with updates, no-updates, and errors, but also the total number of containers checked, the duration of the update check, and the epoch timestamp of the last check.
- Enhanced documentation with instructions on integrating these metrics with Grafana for visual monitoring.
- **Improved Error Handling & Code Refactoring:**
- Introduced `set -euo pipefail` and local variable scoping within functions to improve reliability and prevent unexpected behaviour.
- Standardised container name handling and refined the Quadlet detection logic.
- **Self-Update Enhancements:**
- Updated the self-update mechanism to support both Git-based and HTTP-based updates, with an automatic restart that preserves the original arguments.
- **Miscellaneous Improvements:**
- Enhanced dependency installer to support both package manager and static binary installations for `jq` and `regctl`.
- General code refactoring across the project for better readability and maintainability.
* Update podcheck.sh
* increment version
* Update Quadlet detection logic
Update Quadlet detection logic to support flexible service naming
- Modified the quadlet update block to first try an exact match for "$i.service".
- If no exact match is found, build a regex pattern from the container name (allowing underscores and hyphens interchangeably) and search user service units.
- When multiple candidate units are found, the script attempts to choose the one that exactly matches (ignoring case) or defaults to the first candidate.
- This update allows containers like "containera" to match service units named "container_a.service" and supports scenarios with multiple counterparts (e.g., matrix-a, matrix-b, matrix_db).
* search name fix
* fixes to arg parsing
* Logic overhaul, verbose output and better syntax
* Added support for prometheus
---------
Co-authored-by: mag37 <robin.ivehult@gmail.com>
2025-02-25 14:12:01 +00:00
|
|
|
|