Merge branch 'main' into cassandra

This commit is contained in:
Madhur Ahuja
2024-01-20 10:05:51 +05:30
14 changed files with 174 additions and 36 deletions

70
ct/hyperhdr.sh Normal file
View File

@@ -0,0 +1,70 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
function header_info {
clear
cat <<"EOF"
__ __ __ ______ ____
/ / / /_ ______ ___ _____/ / / / __ \/ __ \
/ /_/ / / / / __ \/ _ \/ ___/ /_/ / / / / /_/ /
/ __ / /_/ / /_/ / __/ / / __ / /_/ / _, _/
/_/ /_/\__, / .___/\___/_/ /_/ /_/_____/_/ |_|
/____/_/
EOF
}
header_info
echo -e "Loading..."
APP="HyperHDR"
var_disk="4"
var_cpu="2"
var_ram="2048"
var_os="debian"
var_version="12"
variables
color
catch_errors
function default_settings() {
CT_TYPE="0"
PW=""
CT_ID=$NEXTID
HN=$NSAPP
DISK_SIZE="$var_disk"
CORE_COUNT="$var_cpu"
RAM_SIZE="$var_ram"
BRG="vmbr0"
NET="dhcp"
GATE=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8090${CL} \n"

View File

@@ -136,6 +136,7 @@ function update_script() {
msg_info "Building Frontend"
cd ./frontend
export NODE_ENV=development
yarn add -D sass-loader@10.5.2 &>/dev/null
yarn install --network-timeout=30000 &>/dev/null
yarn build &>/dev/null
cp -r dist/* /app/frontend
@@ -185,4 +186,5 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:81${CL} \n"
${BL}http://${IP}:81${CL}
${RD}Reboot LXC if no GUI${CL}\n"

View File

@@ -56,26 +56,17 @@ function update_script() {
header_info
if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1)
latest_version=$(basename "${latest_url}" | sed -e 's/.*ller_//;s/_Li.*//')
latest_version=$(basename "${latest_url}")
if [ -z "${latest_version}" ]; then
msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time."
exit
fi
installed_version=$(dpkg -l | grep omada | awk '{print $3}')
if [ "v${installed_version}" = "${latest_version}" ]; then
msg_info "Installed version (v${installed_version}) is the same as the latest version (${latest_version})"
sleep 2
msg_ok "Omada Controller is already up to date"
exit
else
echo -e "Updating Omada Controller to ${latest_version}"
wget -qL ${latest_url}
dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb
rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb
echo -e "Updated Omada Controller to ${latest_version}"
echo -e "Updating Omada Controller"
wget -qL ${latest_url}
dpkg -i ${latest_version}
rm -rf ${latest_version}
echo -e "Updated Omada Controller"
exit
fi
}
start