update to V2
This commit is contained in:
+28
-16
@@ -1,29 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
# TA-Proxmenu - Proxmox Setup Scripts for TA Use
|
||||
|
||||
action="$1"
|
||||
action="${1:-}"
|
||||
FOLDER='/opt/idssys/ta-proxmenu'
|
||||
VERS='2026.7.25-4'
|
||||
VERS='2026.7.29-1'
|
||||
|
||||
noupdate=' '
|
||||
|
||||
|
||||
RNIP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1)
|
||||
|
||||
|
||||
download_url="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso"
|
||||
if curl -m 3 -s --head --request GET ${download_url} | grep "HTTP/2 200" > /dev/null; then
|
||||
while redirect_url=$( curl -I -s -S -f -w "%{redirect_url}\\n" -o /dev/null "${download_url}" ); do
|
||||
VIRTIO_DOWNLOAD_URL=${download_url}; url=${redirect_url}; [[ -z "$url" ]] && break
|
||||
done
|
||||
default_interface="$(ip route 2>/dev/null | awk '/^default/ { print $5; exit }')"
|
||||
if [[ -n "$default_interface" ]]; then
|
||||
RNIP="$(ip -4 -o addr show dev "$default_interface" scope global 2>/dev/null | awk '{ sub(/\/.*/, "", $4); print $4; exit }')"
|
||||
else
|
||||
VIRTIO_DOWNLOAD_URL="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.285-1/virtio-win-0.1.285.iso"
|
||||
RNIP=""
|
||||
fi
|
||||
VIRTIO_FILE=${VIRTIO_DOWNLOAD_URL##*/}
|
||||
|
||||
[ -d /mnt/pve/PVE-Shared-Storage/template/iso ] && DLDIR=/mnt/pve/PVE-Shared-Storage/template/iso || DLDIR=/var/lib/vz/template/iso
|
||||
VIRTIO_STABLE_URL="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso"
|
||||
|
||||
PULSE_RELEASE='v6.1.1'
|
||||
PULSE_PORT='7655'
|
||||
|
||||
source "${FOLDER}/inc/runtime-config.inc"
|
||||
TAPM_ENSURE_RUNTIME_CONFIG || return 1 2>/dev/null || exit 1
|
||||
source "${FOLDER}/inc/fleet.inc"
|
||||
TAPM_FLEET_ENSURE_IDENTITY || true
|
||||
S1_BROKER_PACKAGE='sentinelone-linux'
|
||||
S1_PACKAGE='tapm-sentinelone.deb'
|
||||
|
||||
# Imported from iDS-Defaults/default.inc. These are the only shared-default
|
||||
# functions TA-ProxMenu calls.
|
||||
EXIT1() {
|
||||
clear
|
||||
exit 0
|
||||
}
|
||||
|
||||
ENTER2CONTINUE() {
|
||||
echo
|
||||
read -r -s -p "[Press ENTER to continue]"
|
||||
echo -e "\e[1A\n\e[0K\r\n"
|
||||
}
|
||||
|
||||
# if [ -f /etc/apt/sources.list.d/gyptazy.list ]; then
|
||||
# rm -f /etc/apt/sources.list.d/gyptazy.list /etc/apt/keyrings/gyptazy.asc
|
||||
@@ -31,5 +45,3 @@ VIRTIO_FILE=${VIRTIO_DOWNLOAD_URL##*/}
|
||||
# wget -O /etc/apt/trusted.gpg.d/proxlb.asc https://repo.gyptazy.com/repository.gpg
|
||||
# apt-get update
|
||||
# fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user