Add Asterisk LXC
This commit is contained in:
parent
5da93703da
commit
34b7059ec6
39
ct/asterisk.sh
Normal file
39
ct/asterisk.sh
Normal file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s 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:-os}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
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 [[ ! -d /var ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "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}"
|
53
install/asterisk-install.sh
Normal file
53
install/asterisk-install.sh
Normal file
@ -0,0 +1,53 @@
|
||||
#!/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 /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y /
|
||||
libsrtp2-dev /
|
||||
build-essential /
|
||||
libedit-dev /
|
||||
uuid-dev /
|
||||
libjansson-dev /
|
||||
libxml2-dev /
|
||||
libsqlite3-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Downloading Asterisk"
|
||||
RELEASE=$(curl -s https://downloads.asterisk.org/pub/telephony/asterisk/ | grep -o 'asterisk-[0-9]\+-current\.tar\.gz' | sort -V | tail -n1)
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://downloads.asterisk.org/pub/telephony/asterisk/${RELEASE}" -o "$temp_file"
|
||||
mkdir -p /opt/asterisk
|
||||
tar zxf "$temp_file" --strip-components=1 -C /opt/asterisk
|
||||
cd /opt/asterisk
|
||||
msg_ok "Done downloading Asterisk"
|
||||
|
||||
msg_info "Installing Asterisk"
|
||||
$STD ./contrib/scripts/install_prereq install
|
||||
$STD ./configure
|
||||
$STD make -j$(nproc)
|
||||
$STD make install
|
||||
$STD make config
|
||||
$STD make install-logrotate
|
||||
$STD make samples
|
||||
$STD systemctl enable -q --now asterisk
|
||||
msg_ok "Installed Asterisk"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
$STD rm -f "$temp_file"
|
||||
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user