55 lines
1.7 KiB
Bash
Executable File
55 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# TA-Proxmenu - Proxmox Setup Scripts for TA Use
|
|
|
|
action="${1:-}"
|
|
FOLDER='/opt/idssys/ta-proxmenu'
|
|
VERS='2026.7.26-4'
|
|
|
|
noupdate=' '
|
|
|
|
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
|
|
RNIP=""
|
|
fi
|
|
|
|
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'
|
|
|
|
TAPM_CONFIG_FILE='/etc/ta-proxmenu/config.env'
|
|
for config_key in TAPM_BROKER_URL GITEA_DOMAIN; do
|
|
if [[ -z "${!config_key:-}" && -r "$TAPM_CONFIG_FILE" ]]; then
|
|
config_value="$(
|
|
sed -n "s/^[[:space:]]*${config_key}[[:space:]]*=[[:space:]]*//p" \
|
|
"$TAPM_CONFIG_FILE" |
|
|
tail -n 1
|
|
)"
|
|
config_value="${config_value#\"}"
|
|
config_value="${config_value%\"}"
|
|
config_value="${config_value#\'}"
|
|
config_value="${config_value%\'}"
|
|
printf -v "$config_key" '%s' "$config_value"
|
|
fi
|
|
done
|
|
unset config_key config_value
|
|
TAPM_BROKER_URL="${TAPM_BROKER_URL:-}"
|
|
TAPM_BROKER_URL="${TAPM_BROKER_URL%/}"
|
|
GITEA_DOMAIN="${GITEA_DOMAIN:-}"
|
|
if [[ "$GITEA_DOMAIN" =~ ^[A-Za-z0-9.-]+(:[0-9]+)?$ ]]; then
|
|
GITEA_URL="https://${GITEA_DOMAIN}"
|
|
else
|
|
GITEA_URL=''
|
|
fi
|
|
S1_BROKER_PACKAGE='sentinelone-linux'
|
|
S1_PACKAGE='tapm-sentinelone.deb'
|
|
|
|
# if [ -f /etc/apt/sources.list.d/gyptazy.list ]; then
|
|
# rm -f /etc/apt/sources.list.d/gyptazy.list /etc/apt/keyrings/gyptazy.asc
|
|
# echo "deb https://repo.gyptazy.com/stable /" > /etc/apt/sources.list.d/proxlb.list
|
|
# wget -O /etc/apt/trusted.gpg.d/proxlb.asc https://repo.gyptazy.com/repository.gpg
|
|
# apt-get update
|
|
# fi
|