Update proxmenu-scripts.sh
This commit is contained in:
@@ -216,7 +216,28 @@ RESTART_PVE_SERVICES(){
|
||||
[ ${action-x} ] && exit 0 || ENTER2CONTINUE
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
MAINTENANCE_MODE(){
|
||||
if ha-manager status | grep -q "maintenance-mode"; then
|
||||
echo -en "${idsCL[LightCyan]}Take the local host out of maintenance mode (Y/n)?${idsCL[Default]} "
|
||||
else
|
||||
echo -en "${idsCL[LightCyan]Put the local host into maintenance mode (Y/n)?${idsCL[Default]} "
|
||||
fi
|
||||
read -n 1 choice
|
||||
case "$choice" in
|
||||
[Nn]) echo;;
|
||||
*) echo
|
||||
if ha-manager status | grep -q "maintenance-mode"; then
|
||||
ha-manager crm-command node-maintenance disable $(hostname) &
|
||||
echo -e "\n${idsCL[Green]}This host will be taken out of maintenance mode${idsCL[Default]}\n"
|
||||
else
|
||||
ha-manager crm-command node-maintenance enable $(hostname) &
|
||||
echo -e "\n${idsCL[Green]}This host will be entered into maintenance mode${idsCL[Default]}\n"
|
||||
fi
|
||||
[ ${action-x} ] && exit 0 || ENTER2CONTINUE
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
MAIN_MENU() {
|
||||
@@ -233,15 +254,12 @@ MAIN_MENU() {
|
||||
|
||||
echo -en " [${idsCL[LightYellow]}0${idsCL[Default]}] ${idsCL[White]}Run Post-Install Script${idsCL[Default]}"
|
||||
[ -f /opt/.PROXMENUX_POST_INSTALL ] && echo -e "${idsCL[Cyan]} - Has been ran prevously${idsCL[Default]}" || echo
|
||||
|
||||
echo -e " [${idsCL[LightYellow]}1${idsCL[Default]}] ${idsCL[White]}Detect CPU-Arch for Live Migrations${idsCL[Default]}"
|
||||
|
||||
if ! pvesh get /cluster/resources | grep -i pulse &> /dev/null ; then
|
||||
echo -e " [${idsCL[LightYellow]}2${idsCL[Default]}] ${idsCL[White]}Install Pulse Monitoring${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [2] Pulse Monitoring is already installed${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
if [ -f /var/lib/vz/template/iso/${VIRTIO_FILE} ]; then
|
||||
echo -e "${idsCL[DarkGray]} [3] Current VirtIO drivers already downloaded to 'local' on this host${idsCL[Default]}"
|
||||
elif [ -f /var/lib/vz/template/iso/virtio*.iso ]; then
|
||||
@@ -249,47 +267,44 @@ MAIN_MENU() {
|
||||
else
|
||||
echo -e " [${idsCL[LightYellow]}3${idsCL[Default]}] ${idsCL[White]}Download the current Win-VirtIO drivers to 'local' on this host${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
if ! command -v glances &> /dev/null; then
|
||||
echo -e " [${idsCL[LightYellow]}4${idsCL[Default]}] ${idsCL[White]}Install Glances (CLI Monitor)${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [4] Glances is already installed${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
if [ "$(dpkg -l | awk '/srvadmin-all/ {print }'|wc -l)" -eq 0 ]; then
|
||||
echo -e " [${idsCL[LightYellow]}5${idsCL[Default]}] ${idsCL[White]}Install Dell OpenManage Server Administrator${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [5] Dell OMSA is already installed - ${idsCL[Cyan]}https://${RNIP}:1311"
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
if [ "$(systemctl is-active ITSPlatform)" != "active" ]; then
|
||||
echo -e " [${idsCL[LightYellow]}6${idsCL[Default]}] ${idsCL[White]}Install ConnectWise RMM Agent${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [6] ConnectWise RMM Agent is already installed${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
if [ "$(dpkg -l | awk '/cyberprotect/ {print }'|wc -l)" -eq 0 ]; then
|
||||
echo -e " [${idsCL[LightYellow]}7${idsCL[Default]}] ${idsCL[White]}Install Acronis Backup Agent${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [7] Acronis Backup is already installed${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
if [ "$(dpkg -l | awk '/sentinelagent/ {print }'|wc -l)" -eq 0 ]; then
|
||||
echo -e " [${idsCL[LightYellow]}8${idsCL[Default]}] ${idsCL[White]}Install SentinelOne Agent${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [8] SentinelOne is already installed${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
if [ "$(systemctl is-active connectwise*)" != "active" ]; then
|
||||
echo -e " [${idsCL[LightYellow]}S${idsCL[Default]}] ${idsCL[White]}Install ScreenConnect Agent${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[DarkGray]} [S] ScreenConnect is already installed${idsCL[Default]}"
|
||||
fi
|
||||
echo -e " [${idsCL[LightYellow]}M${idsCL[Default]}] ${idsCL[White]}Put Host into Maintenance Mode${idsCL[Default]}"
|
||||
echo
|
||||
if ha-manager status | grep -q "maintenance-mode"; then
|
||||
echo -e " [${idsCL[LightYellow]}M${idsCL[Default]}] ${idsCL[White]}Take Host out of Maintenance Mode${idsCL[Default]}"
|
||||
else
|
||||
echo -e " [${idsCL[LightYellow]}M${idsCL[Default]}] ${idsCL[White]}Put Host into Maintenance Mode${idsCL[Default]}"
|
||||
fi
|
||||
echo -e " [${idsCL[LightYellow]}R${idsCL[Default]}] ${idsCL[White]}Restart Proxmox Services${idsCL[Default]}"
|
||||
echo -e " [${idsCL[LightYellow]}Q${idsCL[Default]}] ${idsCL[White]}Quit${idsCL[Default]}"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user