From 958e42edee1cb6674b9e49ca633eda054bcceeb5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 3 Nov 2025 11:09:34 +0100 Subject: [PATCH] test --- ct/asterisk.sh | 35 +++++++++++ ct/rybbit.sh | 24 ++++---- install/asterisk-install.sh | 113 ++++++++++++++++++++++++++++++++++++ install/rybbit-install.sh | 2 +- 4 files changed, 161 insertions(+), 13 deletions(-) create mode 100644 ct/asterisk.sh create mode 100644 install/asterisk-install.sh diff --git a/ct/asterisk.sh b/ct/asterisk.sh new file mode 100644 index 000000000..02f2506cb --- /dev/null +++ b/ct/asterisk.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://asterisk.org/ + +APP="Asterisk" +var_tags="${var_tags:-telephone;pbx}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-4}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + msg_error "No Update function provided for ${APP} LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" diff --git a/ct/rybbit.sh b/ct/rybbit.sh index e523bde2b..62447664c 100644 --- a/ct/rybbit.sh +++ b/ct/rybbit.sh @@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}" var_ram="${var_ram:-2048}" var_disk="${var_disk:-5}" var_os="${var_os:-debian}" -var_version="${var_version:-12}" +var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -20,18 +20,18 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /var ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP LXC" - $STD apt-get update - $STD apt-get -y upgrade - msg_ok "Updated $APP LXC" + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Updating $APP LXC" + $STD apt-get update + $STD apt-get -y upgrade + msg_ok "Updated $APP LXC" + exit } start diff --git a/install/asterisk-install.sh b/install/asterisk-install.sh new file mode 100644 index 000000000..07557a072 --- /dev/null +++ b/install/asterisk-install.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: michelroegl-brunner +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://asterisk.org + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +ASTERISK_VERSIONS_URL="https://www.asterisk.org/downloads/asterisk/all-asterisk-versions/" +html=$(curl -fsSL "$ASTERISK_VERSIONS_URL") + +LTS_VERSION="" +for major in 20 22 24 26; do + block=$(echo "$html" | awk "/Asterisk $major - LTS/,/