mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2026-08-28 00:46:54 +00:00
Fix: Incorporate the new update functions to prevent a empty grep on … (#16809)
* Fix: Incorporate the new update functions to prevent a empty grep on the legacy link in /usr/bin/update * Remove outdated comments from update-apps.sh Removed comments regarding the new-style entrypoint and fallback logic for service extraction. --------- Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
This commit is contained in:
co-authored by
CanbiZ
parent
45a6102d48
commit
07d1f0837d
@@ -173,7 +173,11 @@ function detect_service() {
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
fi
|
||||
service=$(grep -oE '/ct/[a-zA-Z0-9._-]+\.sh' "$update_file" 2>/dev/null | head -n1 | sed 's|.*/ct/||; s|\.sh$||')
|
||||
|
||||
service=$(sed -n -E 's/^[[:space:]]*export[[:space:]]+UPDATE_SCRIPT_NAME=["'"'"']?([a-zA-Z0-9._-]+).*/\1/p' "$update_file" | head -n1)
|
||||
[[ -z "$service" ]] && service=$(sed -n -E 's/^[[:space:]]*export[[:space:]]+SCRIPT_SLUG=["'"'"']?([a-zA-Z0-9._-]+).*/\1/p' "$update_file" | head -n1)
|
||||
[[ -z "$service" ]] && service=$(grep -oE '/ct/[a-zA-Z0-9._-]+\.sh' "$update_file" 2>/dev/null | head -n1 | sed 's|.*/ct/||; s|\.sh$||')
|
||||
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user