fixing good
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
This commit is contained in:
@@ -63,8 +63,6 @@ process_running() {
|
|||||||
|
|
||||||
# Detect the operating system
|
# Detect the operating system
|
||||||
detect_operating_system() {
|
detect_operating_system() {
|
||||||
log_info "Detecting operating system..."
|
|
||||||
|
|
||||||
if command_exists apk; then
|
if command_exists apk; then
|
||||||
echo "Alpine"
|
echo "Alpine"
|
||||||
elif command_exists apt; then
|
elif command_exists apt; then
|
||||||
@@ -108,6 +106,8 @@ install_packages() {
|
|||||||
apk add --no-cache "${packages[@]}" >/dev/null || die "Failed to install packages via APK"
|
apk add --no-cache "${packages[@]}" >/dev/null || die "Failed to install packages via APK"
|
||||||
;;
|
;;
|
||||||
"Debian")
|
"Debian")
|
||||||
|
log_info "Ensuring /var/cache/apt/archives/partial exists..."
|
||||||
|
mkdir -p /var/cache/apt/archives/partial || die "Failed to create /var/cache/apt/archives/partial"
|
||||||
log_info "Updating APT package index..."
|
log_info "Updating APT package index..."
|
||||||
apt-get update -y >/dev/null || die "Failed to update APT package index"
|
apt-get update -y >/dev/null || die "Failed to update APT package index"
|
||||||
|
|
||||||
@@ -257,6 +257,7 @@ main() {
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# System detection and validation
|
# System detection and validation
|
||||||
|
log_info "Detecting operating system..."
|
||||||
local detected_os
|
local detected_os
|
||||||
detected_os=$(detect_operating_system)
|
detected_os=$(detect_operating_system)
|
||||||
detected_os=$(echo "$detected_os" | tr -d '\n\r' | xargs) # Clean any whitespace/newlines
|
detected_os=$(echo "$detected_os" | tr -d '\n\r' | xargs) # Clean any whitespace/newlines
|
||||||
|
Reference in New Issue
Block a user