add AllStarLink Script
This commit is contained in:
parent
96548a7890
commit
d050d1eaea
44
ct/allstarlink.sh
Normal file
44
ct/allstarlink.sh
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#!/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: Don Locke (DonLocke)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/AllStarLink
|
||||||
|
|
||||||
|
APP="AllStarLink"
|
||||||
|
var_tags="radio"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="512"
|
||||||
|
var_disk="8"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
if [[ ! -d /etc/asterisk ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
msg_info "Updating $APP LXC"
|
||||||
|
$STD apt-get update
|
||||||
|
$STD DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
||||||
|
msg_ok "Updated $APP LXC"
|
||||||
|
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}/allmon3${CL}"
|
5
ct/headers/allstarlink
Normal file
5
ct/headers/allstarlink
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
___ ____ ____ __ __ _ __
|
||||||
|
/ | / / / ___// /_____ ______/ / (_)___ / /__
|
||||||
|
/ /| | / / /\__ \/ __/ __ `/ ___/ / / / __ \/ //_/
|
||||||
|
/ ___ |/ / /___/ / /_/ /_/ / / / /___/ / / / / ,<
|
||||||
|
/_/ |_/_/_/_____/\__/\__,_/_/ /_____/_/_/ /_/_/|_|
|
39
frontend/public/json/allstarlink.json
Normal file
39
frontend/public/json/allstarlink.json
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"name": "AllStarLink",
|
||||||
|
"slug": "allstarlink",
|
||||||
|
"categories": [
|
||||||
|
24
|
||||||
|
],
|
||||||
|
"date_created": "2025-3-30",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://allstarlink.github.io/",
|
||||||
|
"website": "https://www.allstarlink.org/",
|
||||||
|
"logo": "https://raw.githubusercontent.com/AllStarLink/ASL3-Manual/blob/main/docs/assets/allstar-logo-small.png",
|
||||||
|
"description": "AllStarLink is a network of Amateur Radio repeaters, remote base stations and hot spots accessible to each other via Voice over Internet Protocol.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/allstarlink.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 512,
|
||||||
|
"hdd": 8,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": null,
|
||||||
|
"password": null
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "Options to Install Allmon3",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
62
install/allstarlink-install.sh
Normal file
62
install/allstarlink-install.sh
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Don Locke (DonLocke)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/AllStarLink
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Adding ASL Package Repository"
|
||||||
|
wget -q -P /tmp https://repo.allstarlink.org/public/asl-apt-repos.deb12_all.deb
|
||||||
|
$STD dpkg -i /tmp/asl-apt-repos.deb12_all.deb
|
||||||
|
$STD apt-get update
|
||||||
|
msg_ok "Added ASL Package Repository"
|
||||||
|
|
||||||
|
msg_info "Installing AllStarLink"
|
||||||
|
$STD apt-get install -y asl3
|
||||||
|
msg_ok "Installed AllStarLink"
|
||||||
|
|
||||||
|
msg_info "Configuring AllStarLink"
|
||||||
|
sed -i "/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/" /etc/asterisk/manager.conf
|
||||||
|
msg_ok "Configured AllStarLink"
|
||||||
|
|
||||||
|
read -r -p "Would you like to set up AllStarLink Node now? <y/N> " prompt
|
||||||
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
node-setup
|
||||||
|
else
|
||||||
|
msg_warn "You will need to run \`node-setup\` before you can connect to the AllStarLink Network."
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r -p "Would you like to add Allmon3? <y/N> " prompt
|
||||||
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
msg_info "Installing Allmon3"
|
||||||
|
$STD apt-get install -y allmon3
|
||||||
|
msg_ok "Installed Allmon3"
|
||||||
|
|
||||||
|
NODE=$(grep -oP '^\[\d+\]\(node-main\)' /etc/asterisk/rpt.conf | grep -oP '\d+')
|
||||||
|
if [[ -n $NODE ]]; then
|
||||||
|
msg_info "Configuring Allmon3"
|
||||||
|
sed -i "s/;\[1999\]/\[$NODE\]/" /etc/allmon3/allmon3.ini
|
||||||
|
sed -i "s/;host/host/" /etc/allmon3/allmon3.ini
|
||||||
|
sed -i "s/;user/user/" /etc/allmon3/allmon3.ini
|
||||||
|
sed -i "s/;pass=.*/pass=$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/" /etc/allmon3/allmon3.ini
|
||||||
|
systemctl restart allmon3
|
||||||
|
msg_ok "Configured Allmon3"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -f /tmp/asl-apt-repos.deb12_all.deb
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user