Compare commits

...

6 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
d08c455df2 fix(tools.func): add Alpine (apk) support to ensure_dependencies and is_package_installed
ensure_dependencies() and is_package_installed() used dpkg-query and apt
which don't exist on Alpine Linux. When alpine-install.func sources tools.func,
these functions would fail with 'exit code 980' errors.

Added Alpine detection (/etc/alpine-release) to both functions:
- ensure_dependencies: uses apk info/apk add on Alpine
- is_package_installed: uses apk info -e on Alpine

Fixes #12698
2026-03-09 08:20:04 +01:00
community-scripts-pr-app[bot]
b3bedd720f Update CHANGELOG.md (#12702)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-09 07:06:16 +00:00
Nícolas Pastorello
b0858920d5 Change cronjob setup to use www-data user (#12695) 2026-03-09 08:05:50 +01:00
community-scripts-pr-app[bot]
e4e365b701 Update CHANGELOG.md (#12701)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-09 06:35:35 +00:00
Slaviša Arežina
c4315713b5 Fix check_for_gh_release function call (#12694) 2026-03-09 07:35:11 +01:00
community-scripts-pr-app[bot]
047ea2c66d chore: update github-versions.json (#12700)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-09 06:22:52 +00:00
5 changed files with 52 additions and 11 deletions

View File

@@ -422,6 +422,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-03-09
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Change cronjob setup to use www-data user [@opastorello](https://github.com/opastorello) ([#12695](https://github.com/community-scripts/ProxmoxVE/pull/12695))
- RustDesk Server: Fix check_for_gh_release function call [@tremor021](https://github.com/tremor021) ([#12694](https://github.com/community-scripts/ProxmoxVE/pull/12694))
## 2026-03-08
### 🚀 Updated Scripts

View File

@@ -29,7 +29,7 @@ function update_script() {
exit
fi
if check_for_gh_release "lejianwen/rustdesk-api"; then
if check_for_gh_release "rustdesk-hbbs" "lejianwen/rustdesk-server"; then
msg_info "Stopping Service"
systemctl stop rustdesk-hbbr
systemctl stop rustdesk-hbbs

View File

@@ -1,5 +1,5 @@
{
"generated": "2026-03-09T00:21:26Z",
"generated": "2026-03-09T06:22:44Z",
"versions": [
{
"slug": "2fauth",
@@ -284,9 +284,9 @@
{
"slug": "discopanel",
"repo": "nickheyer/discopanel",
"version": "v2.0.1",
"version": "v2.0.2",
"pinned": false,
"date": "2026-03-07T02:43:33Z"
"date": "2026-03-09T03:38:49Z"
},
{
"slug": "dispatcharr",
@@ -620,9 +620,9 @@
{
"slug": "jackett",
"repo": "Jackett/Jackett",
"version": "v0.24.1316",
"version": "v0.24.1323",
"pinned": false,
"date": "2026-03-08T05:59:08Z"
"date": "2026-03-09T05:55:36Z"
},
{
"slug": "jellystat",

View File

@@ -137,7 +137,7 @@ rm -rf /opt/glpi-${RELEASE}.tgz
msg_ok "Setup Service"
msg_info "Setup Cronjob"
echo "* * * * * php /opt/glpi/front/cron.php" | crontab -
echo "* * * * * php /opt/glpi/front/cron.php" | crontab -u www-data -
msg_ok "Setup Cronjob"
msg_info "Update PHP Params"

View File

@@ -969,13 +969,43 @@ verify_repo_available() {
}
# ------------------------------------------------------------------------------
# Ensure dependencies are installed (with apt update caching)
# Ensure dependencies are installed (with apt/apk update caching)
# Supports both Debian (apt/dpkg) and Alpine (apk) systems
# ------------------------------------------------------------------------------
ensure_dependencies() {
local deps=("$@")
local missing=()
# Fast batch check using dpkg-query (much faster than individual checks)
# Detect Alpine Linux
if [[ -f /etc/alpine-release ]]; then
for dep in "${deps[@]}"; do
if command -v "$dep" &>/dev/null; then
continue
fi
if apk info -e "$dep" &>/dev/null; then
continue
fi
missing+=("$dep")
done
if [[ ${#missing[@]} -gt 0 ]]; then
$STD apk add --no-cache "${missing[@]}" || {
local failed=()
for pkg in "${missing[@]}"; do
if ! $STD apk add --no-cache "$pkg" 2>/dev/null; then
failed+=("$pkg")
fi
done
if [[ ${#failed[@]} -gt 0 ]]; then
msg_error "Failed to install dependencies: ${failed[*]}"
return 1
fi
}
fi
return 0
fi
# Debian/Ubuntu: Fast batch check using dpkg-query
local installed_pkgs
installed_pkgs=$(dpkg-query -W -f='${Package}\n' 2>/dev/null | sort -u)
@@ -1072,11 +1102,15 @@ create_temp_dir() {
}
# ------------------------------------------------------------------------------
# Check if package is installed (faster than dpkg -l | grep)
# Check if package is installed (supports both Debian and Alpine)
# ------------------------------------------------------------------------------
is_package_installed() {
local package="$1"
dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -q "^install ok installed$"
if [[ -f /etc/alpine-release ]]; then
apk info -e "$package" &>/dev/null
else
dpkg-query -W -f='${Status}' "$package" 2>/dev/null | grep -q "^install ok installed$"
fi
}
# ------------------------------------------------------------------------------