Files
TA-ProxMenu/proxmenu-scripts.sh

112 lines
3.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# TA-Proxmenu - Proxmox Scripts for TA Use
[ "${2}" != "q" ] && source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
source /opt/idssys/ta-proxmenu/defaults.inc
INSTALL_ACRONIS() {
read -n 1 -p "Are you sure you wish to install Acronis (Y/n)?" choice
case "$choice" in
[Nn]) MAIN_MENU;;
* )
echo
echo -e "\n${idsCL[Green]}Acronis has been installed${idsCL[Default]}"
[ ${action-x} ] && exit 0
ENTER2CONTINUE
esac
}
INSTALL_PROXMENUX() {
read -n 1 -p "Are you sure you wish to install ProxMenux (Y/n)?" choice
case "$choice" in
[Nn]) MAIN_MENU;;
* )
echo
bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)"
echo -e "\n${idsCL[Green]}ProxMenux has been installed${idsCL[Default]}"
[ ${action-x} ] && exit 0
ENTER2CONTINUE
esac
}
INSTALL_SCREENCONNECT() {
read -n 1 -p "Are you sure you wish to install ScreenConnect (Y/n)?" choice
case "$choice" in
[Nn]) MAIN_MENU;;
* )
echo
echo -en "${idsCL[LightYellow]}Paste the URL provided from the Build Installer: ${idsCL[Default]}"
read -e RMMURL
wget "${RMMURL}" -o /tmp/rmminstall
dpkg -i /tmp/rmminstall
rm -f /tmp/rmminstall
echo -e "\n${idsCL[Green]}ScreenConnect has been installed${idsCL[Default]}"
[ ${action-x} ] && exit 0
ENTER2CONTINUE
esac
}
MAIN_MENU() {
while :
do
clear
echo
echo -e " ${idsCL[Green]}TA-Proxmenu - Proxmox Scripts${idsCL[Default]} ${idsCL[Default]}(ver-${VERS})"
echo -e "${idsCL[Green]}---------------------------------------------------------------------------${idsCL[Default]}"
echo -e "Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}"
echo -e "IP Address: ${idsCL[Cyan]}${RNIP}${idsCL[Default]}"
echo -e "---------------------------------------------------------------------------"
echo
echo -e " [${idsCL[Yellow]}1${idsCL[Default]}] ${idsCL[White]}Install ProxMenux${idsCL[Default]}"
echo -e " [${idsCL[Yellow]}2${idsCL[Default]}] ${idsCL[White]}Install Acronis CyberProtect Backup Agent${idsCL[Default]}"
echo -e " [${idsCL[Yellow]}3${idsCL[Default]}] ${idsCL[White]}Install ScreenConnect Agent${idsCL[Default]}"
echo
echo
echo -e " [${idsCL[Yellow]}Q${idsCL[Default]}] ${idsCL[White]}Quit${idsCL[Default]}"
echo
echo
echo -e -n "${idsCL[Yellow]}Please select an [ActionItem] from above:${idsCL[Default]} "
read -n 1 opt
echo
case $opt in
[1]) INSTALL_PROXMENUX;;
[2]) INSTALL_ACRONIS;;
[3]) INSTALL_SCREENCONNECT;;
[Qq])
EXIT1
exit 0;;
*) echo "Thats an invaild option,";
echo "please select a valid option only.";
sleep 1;;
esac
done
}
if [ ${action-x} ]; then
case $action in
install-acronis) INSTALL_ACRONIS;;
install-proxmenux) INSTALL_PROXMENUX;;
install-screenconnect) INSTALL_SCREENCONNECT;;
*) MAIN_MENU;;
esac
else
MAIN_MENU
fi
exit 0
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Invoke-Expression "& { $(Invoke-RestMethod https://gist.githubusercontent.com/Jason-Clark-FG/68e23b534f5be4e3f3b43f3bd37f1d65/raw/3cb722298d72d2d12f2e7359473308925c4b8081/Uninstall-VMwareTools.ps1) } -Uninstall -Force"