diff --git a/misc/build.func b/misc/build.func index f7d85b16..63e73f17 100644 --- a/misc/build.func +++ b/misc/build.func @@ -158,8 +158,19 @@ arch_check() { # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. header_info() { - apt-get install -y figlet &> /dev/null - ascii_art=$(figlet -f slant "$APP") + if [ -f /etc/debian_version ]; then + # Debian/Ubuntu + apt-get install -y figlet &> /dev/null + elif [ -f /etc/alpine-release ]; then + # Alpine Linux + apk add --no-cache figlet &> /dev/null + else + echo "Unsupported OS" + return 1 + fi + + term_width=$(tput cols) + ascii_art=$(figlet -f slant -w "$term_width" "$APP") clear cat </dev/null 2>&1; } -} TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null if [ "$var_os" == "alpine" ]; then - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/misc/alpine-install.func)" else - export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/install.func)" + export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/misc/install.func)" fi export CACHER="$APT_CACHER" export CACHER_IP="$APT_CACHER_IP" @@ -746,7 +750,7 @@ verb() { $PW " # This executes create_lxc.sh and creates the container and .conf file - bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" || exit + bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf if [ "$CT_TYPE" == "0" ]; then @@ -808,7 +812,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community EOF' pct exec "$CTID" -- ash -c "apk add bash >/dev/null" fi - lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/$var_install.sh)" || exit + lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/develop/install/$var_install.sh)" || exit } @@ -820,7 +824,7 @@ description() { DESCRIPTION=$(cat < - Logo + Logo

${APP} LXC

@@ -853,4 +857,4 @@ EOF if [[ -f /etc/systemd/system/ping-instances.service ]]; then systemctl start ping-instances.service fi -} \ No newline at end of file +}