add require_debian_like function

This commit is contained in:
MickLesk
2026-08-03 09:46:19 +02:00
parent cb1b4bb705
commit 9b6476b22a
4 changed files with 7 additions and 48 deletions
+2 -8
View File
@@ -26,14 +26,8 @@ ensure_usr_local_bin_persist
get_lxc_ip
IP="$LOCAL_IP"
if command -v pveversion >/dev/null 2>&1; then
msg_error "Can't Install on Proxmox"
exit 1
fi
if [ -e /etc/alpine-release ]; then
msg_error "Can't Install on Alpine"
exit 1
fi
confirm_not_pve_host
require_debian_like
# ==============================================================================
# UNINSTALL
+1 -12
View File
@@ -29,18 +29,7 @@ APP="homebrew"
APP_TYPE="tools"
INSTALL_PATH="/home/linuxbrew/.linuxbrew"
# ==============================================================================
# OS DETECTION
# ==============================================================================
if [[ -f "/etc/alpine-release" ]]; then
echo -e "${CROSS} Alpine is not supported by Homebrew. Exiting."
exit 1
elif grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then
OS="Debian"
else
echo -e "${CROSS} Unsupported OS detected. Exiting."
exit 1
fi
require_debian_like
# ==============================================================================
# UNINSTALL
+2 -14
View File
@@ -27,24 +27,12 @@ APP="Immich Public Proxy"
APP_TYPE="addon"
INSTALL_PATH="/opt/immich-proxy"
CONFIG_PATH="/opt/immich-proxy/app"
SERVICE_PATH="/etc/systemd/system/immich-proxy.service"
DEFAULT_PORT=3000
# Initialize all core functions (colors, formatting, icons, $STD mode)
load_functions
# ==============================================================================
# OS DETECTION
# ==============================================================================
if [[ -f "/etc/alpine-release" ]]; then
msg_error "Alpine is not supported for ${APP}. Use Debian."
exit 238
elif [[ -f "/etc/debian_version" ]]; then
OS="Debian"
SERVICE_PATH="/etc/systemd/system/immich-proxy.service"
else
echo -e "${CROSS} Unsupported OS detected. Exiting."
exit 238
fi
require_debian_like
# ==============================================================================
# UNINSTALL
+2 -14
View File
@@ -27,24 +27,12 @@ APP="Jellystat"
APP_TYPE="addon"
INSTALL_PATH="/opt/jellystat"
CONFIG_PATH="/opt/jellystat/.env"
SERVICE_PATH="/etc/systemd/system/jellystat.service"
DEFAULT_PORT=3000
# Initialize all core functions (colors, formatting, icons, STD mode)
load_functions
# ==============================================================================
# OS DETECTION
# ==============================================================================
if [[ -f "/etc/alpine-release" ]]; then
msg_error "Alpine is not supported for ${APP}. Use Debian/Ubuntu."
exit 238
elif [[ -f "/etc/debian_version" ]]; then
OS="Debian"
SERVICE_PATH="/etc/systemd/system/jellystat.service"
else
echo -e "${CROSS} Unsupported OS detected. Exiting."
exit 238
fi
require_debian_like
# ==============================================================================
# UNINSTALL