diff --git a/ct/freepbx.sh b/ct/freepbx.sh new file mode 100644 index 000000000..be622f9e3 --- /dev/null +++ b/ct/freepbx.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Arian Nasr (arian-nasr) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.freepbx.org/ + +APP="FreePBX" +var_tags="pbx;voip;telephony" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-10}" +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 + + if [[ ! -f /lib/systemd/system/freepbx.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Currently we don't provide an update function for this ${APP}." + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/ct/headers/freepbx b/ct/headers/freepbx new file mode 100644 index 000000000..25541c2ed --- /dev/null +++ b/ct/headers/freepbx @@ -0,0 +1,6 @@ + ______ ____ ____ _ __ + / ____/_______ ___ / __ \/ __ ) |/ / + / /_ / ___/ _ \/ _ \/ /_/ / __ | / + / __/ / / / __/ __/ ____/ /_/ / | +/_/ /_/ \___/\___/_/ /_____/_/|_| + diff --git a/frontend/public/json/freepbx.json b/frontend/public/json/freepbx.json new file mode 100644 index 000000000..c893f74d5 --- /dev/null +++ b/frontend/public/json/freepbx.json @@ -0,0 +1,41 @@ +{ + "name": "FreePBX", + "slug": "freepbx", + "categories": [ + 0 + ], + "date_created": "2025-03-10", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 80, + "documentation": "https://sangomakb.atlassian.net/wiki/spaces/FP/overview?homepageId=8454359", + "website": "https://www.freepbx.org/", + "logo": "https://avatars.githubusercontent.com/u/696423?s=200&v=4", + "config_path": "", + "description": "FreePBX is a web-based open-source graphical user interface that manages Asterisk, a voice over IP and telephony server.", + "install_methods": [ + { + "type": "default", + "script": "ct/freepbx.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "This script uses the official FreePBX install script. Check it here: https://github.com/FreePBX/sng_freepbx_debian_install", + "type": "info" + } + ] +} + diff --git a/install/freepbx-install.sh b/install/freepbx-install.sh new file mode 100644 index 000000000..887527614 --- /dev/null +++ b/install/freepbx-install.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Arian Nasr (arian-nasr) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.freepbx.org/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing FreePBX (Patience)" +curl -fsSL https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh -o /opt/sng_freepbx_debian_install.sh +$STD bash /opt/sng_freepbx_debian_install.sh +msg_ok "Installed FreePBX" + +motd_ssh +customize + +msg_info "Cleaning up" +rm /opt/sng_freepbx_debian_install.sh +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"