mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-17 18:24:08 +00:00
Compare commits
4 Commits
fix-sugges
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4436c5ac8e | ||
|
|
f52925e6a8 | ||
|
|
1e3e929f9f | ||
|
|
251fd0b6b8 |
@@ -543,6 +543,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-09-17
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- poznote: follow init.sh into docker/ [@MickLesk](https://github.com/MickLesk) ([#17316](https://github.com/community-scripts/ProxmoxVE/pull/17316))
|
||||
|
||||
## 2026-09-16
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -50,8 +50,10 @@ function update_script() {
|
||||
restore_backup
|
||||
|
||||
msg_info "Running Poznote Initialization"
|
||||
chmod +x /opt/poznote/init.sh
|
||||
$STD /opt/poznote/init.sh
|
||||
POZNOTE_INIT=/opt/poznote/docker/init.sh
|
||||
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
|
||||
chmod +x "$POZNOTE_INIT"
|
||||
$STD "$POZNOTE_INIT"
|
||||
msg_ok "Initialized Poznote Data Directory"
|
||||
|
||||
msg_info "Updating Nginx Configuration"
|
||||
|
||||
@@ -37,19 +37,8 @@ function update_script() {
|
||||
systemctl stop suggestarr
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
mkdir -p /opt/suggestarr_data
|
||||
if [[ -d /opt/suggestarr/config/config_files && ! -L /opt/suggestarr/config/config_files ]]; then
|
||||
msg_info "Migrating Configuration"
|
||||
cp -an /opt/suggestarr/config/config_files/. /opt/suggestarr_data/ 2>/dev/null || true
|
||||
msg_ok "Migrated Configuration to /opt/suggestarr_data"
|
||||
fi
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "suggestarr" "giuseppe99barchetta/SuggestArr" "tarball"
|
||||
|
||||
mkdir -p /opt/suggestarr/config
|
||||
rm -rf /opt/suggestarr/config/config_files
|
||||
ln -sfn /opt/suggestarr_data /opt/suggestarr/config/config_files
|
||||
|
||||
msg_info "Building Frontend"
|
||||
cd /opt/suggestarr/client
|
||||
$STD npm install
|
||||
|
||||
@@ -29,8 +29,10 @@ chown -R www-data:www-data /var/www/html
|
||||
msg_ok "Deployed Poznote"
|
||||
|
||||
msg_info "Running Poznote Initialization"
|
||||
chmod +x /opt/poznote/init.sh
|
||||
$STD /opt/poznote/init.sh
|
||||
POZNOTE_INIT=/opt/poznote/docker/init.sh
|
||||
[[ -f "$POZNOTE_INIT" ]] || POZNOTE_INIT=/opt/poznote/init.sh
|
||||
chmod +x "$POZNOTE_INIT"
|
||||
$STD "$POZNOTE_INIT"
|
||||
msg_ok "Initialized Poznote Data Directory"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
|
||||
@@ -38,9 +38,7 @@ $STD uv pip install --python /opt/suggestarr/.venv -r /opt/suggestarr/api_servic
|
||||
msg_ok "Set up Python Environment"
|
||||
|
||||
msg_info "Configuring SuggestArr"
|
||||
mkdir -p /opt/suggestarr_data /opt/suggestarr/config
|
||||
rm -rf /opt/suggestarr/config/config_files
|
||||
ln -sfn /opt/suggestarr_data /opt/suggestarr/config/config_files
|
||||
mkdir -p /opt/suggestarr_data
|
||||
cat <<EOF >/opt/suggestarr.env
|
||||
SUGGESTARR_PORT=5000
|
||||
LOG_LEVEL=info
|
||||
|
||||
203
vm/allstarlink-vm.sh
Normal file
203
vm/allstarlink-vm.sh
Normal file
@@ -0,0 +1,203 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: Don Locke (DonLocke) | MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/AllStarLink
|
||||
|
||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
|
||||
load_functions
|
||||
|
||||
GEN_MAC=02:$(openssl rand -hex 5 | awk '{print toupper($0)}' | sed 's/\(..\)/\1:/g; s/.$//')
|
||||
NEXTID=$(pvesh get /cluster/nextid)
|
||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)"
|
||||
METHOD=""
|
||||
APP="AllStarLink"
|
||||
APP_TYPE="vm"
|
||||
NSAPP="allstarlink-vm"
|
||||
var_os="debian"
|
||||
var_version="13"
|
||||
DISK_SIZE="8G"
|
||||
|
||||
HA=$(echo "\033[1;34m")
|
||||
THIN="discard=on,ssd=1,"
|
||||
|
||||
header_info
|
||||
echo -e "\n Loading..."
|
||||
set -e
|
||||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
trap cleanup EXIT
|
||||
trap 'post_update_to_api "failed" "INTERRUPTED"' SIGINT
|
||||
trap 'post_update_to_api "failed" "TERMINATED"' SIGTERM
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
|
||||
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
|
||||
var_version="${VM_OS_VERSION:-$var_version}"
|
||||
elif vm_dialog radiolist "DEBIAN BASE" "Choose the Debian release AllStarLink runs on" --cancel-button Exit-Script 11 60 2 \
|
||||
"13" "Debian 13 (Trixie)" ON \
|
||||
"12" "Debian 12 (Bookworm)" OFF; then
|
||||
var_version="$VM_DIALOG_RESULT"
|
||||
else
|
||||
exit_script
|
||||
fi
|
||||
|
||||
case "$var_version" in
|
||||
13) DEBIAN_CODENAME="trixie" ;;
|
||||
12) DEBIAN_CODENAME="bookworm" ;;
|
||||
*)
|
||||
msg_error "AllStarLink only publishes packages for Debian 12 and 13 (got '${var_version}')"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
function default_settings() {
|
||||
vm_apply_machine_type "i440fx"
|
||||
VMID="$NEXTID"
|
||||
DISK_CACHE=""
|
||||
HN="allstarlink"
|
||||
CPU_TYPE=""
|
||||
CORE_COUNT="2"
|
||||
RAM_SIZE="2048"
|
||||
BRG="vmbr0"
|
||||
MAC="$GEN_MAC"
|
||||
VLAN=""
|
||||
MTU=""
|
||||
START_VM="yes"
|
||||
METHOD="default"
|
||||
vm_echo_default_settings
|
||||
}
|
||||
|
||||
function advanced_settings() {
|
||||
METHOD="advanced"
|
||||
vm_prompt_vmid "${VMID:-$(get_valid_nextid)}"
|
||||
vm_prompt_machine_type "i440fx"
|
||||
vm_prompt_disk_size "8G"
|
||||
vm_prompt_disk_cache "none"
|
||||
vm_prompt_hostname "allstarlink"
|
||||
vm_prompt_cpu_model "kvm64"
|
||||
vm_prompt_cpu_cores "2"
|
||||
vm_prompt_ram "2048"
|
||||
vm_prompt_bridge "vmbr0"
|
||||
vm_prompt_mac "$GEN_MAC"
|
||||
vm_prompt_vlan
|
||||
vm_prompt_mtu
|
||||
vm_prompt_verbose "no"
|
||||
vm_prompt_start_vm "yes"
|
||||
|
||||
if vm_confirm_advanced_settings "Ready to create a AllStarLink VM?"; then
|
||||
echo -e "${CREATING}${BOLD}${DGN}Creating a AllStarLink VM using the above advanced settings${CL}"
|
||||
else
|
||||
header_info
|
||||
echo -e "${ADVANCED}${BOLD}${RD}Using Advanced Settings${CL}"
|
||||
advanced_settings
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
vm_preflight
|
||||
vm_start_script "Use Default Settings?" 10 58
|
||||
post_to_api_vm
|
||||
|
||||
vm_select_storage "$HN"
|
||||
msg_info "Retrieving the URL for the Debian ${var_version} Qcow2 Disk Image"
|
||||
URL="https://cloud.debian.org/images/cloud/${DEBIAN_CODENAME}/latest/debian-${var_version}-nocloud-$(dpkg --print-architecture).qcow2"
|
||||
sleep 2
|
||||
msg_ok "${CL}${BL}${URL}${CL}"
|
||||
CACHE_FILE="$(vm_image_cache_path "$URL")"
|
||||
vm_fetch_image "$URL" "$CACHE_FILE" --cache --min-bytes $((100 * 1024 * 1024)) || exit 115
|
||||
FILE="$(basename "$CACHE_FILE")"
|
||||
# Work on a copy: the expand and virt-customize steps below rewrite the image,
|
||||
# which would poison the cache for every later VM.
|
||||
cp -f "$CACHE_FILE" "$FILE"
|
||||
|
||||
# qm resize only grows the block device. Without cloud-init nothing grows the
|
||||
# guest partition, so expand it offline first.
|
||||
if [ "${CLOUD_INIT:-no}" != "yes" ]; then
|
||||
msg_info "Expanding the root filesystem to ${DISK_SIZE}"
|
||||
vm_expand_image "$FILE" "$DISK_SIZE" || true
|
||||
fi
|
||||
|
||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||
case $STORAGE_TYPE in
|
||||
nfs | dir)
|
||||
DISK_EXT=".qcow2"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format qcow2"
|
||||
THIN=""
|
||||
;;
|
||||
btrfs)
|
||||
DISK_EXT=".raw"
|
||||
DISK_REF="$VMID/"
|
||||
DISK_IMPORT="-format raw"
|
||||
FORMAT=",efitype=4m"
|
||||
THIN=""
|
||||
;;
|
||||
esac
|
||||
for i in {0,1}; do
|
||||
disk="DISK$i"
|
||||
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
|
||||
eval DISK${i}_REF=${STORAGE}:${DISK_REF:-}${!disk}
|
||||
done
|
||||
|
||||
msg_info "Installing Pre-Requisite libguestfs-tools onto Host"
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y libguestfs-tools lsb-release
|
||||
msg_ok "Installed libguestfs-tools successfully"
|
||||
|
||||
msg_info "Adding ASL Package Repository"
|
||||
virt-customize -q -a "${FILE}" \
|
||||
--run-command "curl -fsSL https://repo.allstarlink.org/public/asl-apt-repos.deb${var_version}_all.deb -o /tmp/asl-apt-repos.deb${var_version}_all.deb" \
|
||||
--run-command "dpkg -i /tmp/asl-apt-repos.deb${var_version}_all.deb" \
|
||||
--update \
|
||||
--run-command "rm -f /tmp/asl-apt-repos.deb${var_version}_all.deb" >/dev/null
|
||||
msg_ok "Added ASL Package Repository"
|
||||
|
||||
msg_info "Installing AllStarLink (patience)"
|
||||
virt-customize -q -a "${FILE}" \
|
||||
--install asl3 \
|
||||
--run-command "sed -i \"/secret /s/= .*/= $(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)/\" /etc/asterisk/manager.conf" >/dev/null
|
||||
msg_ok "Installed AllStarLink"
|
||||
|
||||
vm_prepare_cloud_image "$FILE" "$HN" || true
|
||||
|
||||
if [[ "${VM_UNATTENDED:-0}" == "1" ]]; then
|
||||
ADD_ALLMON3="${VM_ALLMON3:-no}"
|
||||
elif vm_dialog yesno "SETTINGS" "Would you like to add Allmon3?" 10 58; then
|
||||
ADD_ALLMON3="yes"
|
||||
else
|
||||
ADD_ALLMON3="no"
|
||||
fi
|
||||
|
||||
if [[ "$ADD_ALLMON3" == "yes" ]]; then
|
||||
msg_info "Installing Allmon3"
|
||||
virt-customize -q -a "${FILE}" \
|
||||
--install allmon3 \
|
||||
--run-command "sed -i \"s/;pass=.*/;pass=\$(sed -ne 's/^secret = //p' /etc/asterisk/manager.conf)/\" /etc/allmon3/allmon3.ini" >/dev/null
|
||||
msg_ok "Installed Allmon3"
|
||||
fi
|
||||
|
||||
msg_info "Creating a AllStarLink VM"
|
||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||
-name $HN -tags community-script,debian${var_version},radio -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||
qm set $VMID \
|
||||
-efidisk0 ${DISK0_REF}${FORMAT} \
|
||||
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=2G \
|
||||
-boot order=scsi0 \
|
||||
-serial0 socket >/dev/null
|
||||
vm_resize_disk
|
||||
qm set $VMID --agent enabled=1 >/dev/null
|
||||
|
||||
set_description
|
||||
|
||||
msg_ok "Created a AllStarLink VM ${CL}${BL}(${HN})"
|
||||
if [ "$START_VM" == "yes" ]; then
|
||||
msg_info "Starting AllStarLink VM"
|
||||
$STD qm start $VMID
|
||||
msg_ok "Started AllStarLink VM"
|
||||
fi
|
||||
post_update_to_api "done" "none"
|
||||
msg_ok "Completed successfully!\n"
|
||||
Reference in New Issue
Block a user