Files
TA-ProxMenu/proxmenu-scripts.sh
2025-12-14 17:45:48 -06:00

65 lines
1.3 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/linupx/settings.conf
source /opt/idssys/linupx/defaults.inc
MAIN_MENU() {
if [ -f ${FOLDER}/lastrun ]; then
LASTRUND=$(stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f1)
LASTRUNT=$(stat -c %y ${FOLDER}/lastrun | cut -d ' ' -f2 | cut -d '.' -f1)
else
LASTRUND='never'
LASTRUNT=''
fi
while :
do
clear
echo
echo -e " ${idsCL[Green]}TA-Proxmenu - Proxmox Scripts${idsCL[Default]} ${idsCL[White]}(ver-${VERS})${idsCL[Default]}"
echo -e "${idsCL[Green]}---------------------------------------------------------------------------${idsCL[Default]}"
echo -e "Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}"
echo
echo -e "---------------------------------------------------------------------------"
echo
echo -e " [${idsCL[Yellow]}Q${idsCL[Default]}] Quit"
echo
echo
echo -e -n "${idsCL[Yellow]}Please select an [ActionItem] from above:${idsCL[Default]} "
read -n 1 opt
echo
case $opt in
[Qq])
EXIT1
exit 0;;
*) echo "Thats an invaild option,";
echo "please select a valid option only.";
sleep 1;;
esac
done
}
if [ ${1-x} ]; then
case $1 in
update) UPDATE;;
esac
else
MAIN_MENU
fi
exit 0