diff --git a/proxmenu-scripts.sh b/proxmenu-scripts.sh index 4209275..9a33eaa 100755 --- a/proxmenu-scripts.sh +++ b/proxmenu-scripts.sh @@ -7,33 +7,29 @@ source /opt/idssys/defaults/default.inc source /opt/idssys/ta-proxmenu/defaults.inc INSTALL_PULSE() { - read -n 1 -p "Are you sure you wish to install Pulse (Y/n)?" choice - case "$choice" in - [Nn]) MAIN_MENU;; - * ) - echo + echo curl -fsSL https://github.com/rcourtman/Pulse/releases/latest/download/install.sh | bash echo echo -e "\n${idsCL[Green]}Pulse has been installed${idsCL[Default]}" [ ${action-x} ] && exit 0 || ENTER2CONTINUE;; - esac } INSTALL_ACRONIS() { - read -n 1 -p "Are you sure you wish to install Acronis (Y/n)?" choice - case "$choice" in - [Nn]) MAIN_MENU;; - * ) - echo - cd /tmp - wget "https://us5-cloud.acronis.com/bc/api/ams/links/agents/redirect?language=multi&channel=CURRENT&system=linux&architecture=64&productType=enterprise&login=010180ae-63c4-4495-bed0-4ec934c25af9&white_labeled=0" -O ./acronisinstall - chmod +x ./acronisinstall - ./acronisinstall - rm -f ./acronisinstall - echo - echo -e "\n${idsCL[Green]}Acronis has been installed${idsCL[Default]}" - [ ${action-x} ] && exit 0 || ENTER2CONTINUE - esac + read -n 1 -p "Are you sure you wish to install Acronis (Y/n)?" choice + case "$choice" in + [Nn]) MAIN_MENU;; + * ) + echo + cd /tmp + wget "https://us5-cloud.acronis.com/bc/api/ams/links/agents/redirect?language=multi&channel=CURRENT&system=linux&architecture=64&productType=enterprise&login=010180ae-63c4-4495-bed0-4ec934c25af9&white_labeled=0" -O ./acronisinstall + chmod +x ./acronisinstall + ./acronisinstall + rm -f ./acronisinstall + echo + echo -e "\n${idsCL[Green]}Acronis has been installed${idsCL[Default]}" + [ ${action-x} ] && exit 0 || ENTER2CONTINUE + ;; + esac } INSTALL_PROXMENUX() { @@ -44,6 +40,7 @@ INSTALL_PROXMENUX() { # echo bash -c "$(wget -qLO - https://raw.githubusercontent.com/MacRimi/ProxMenux/main/install_proxmenux.sh)" systemctl disable --now proxmenux-monitor + menu # echo -e "\n${idsCL[Green]}ProxMenux has been installed${idsCL[Default]}" # [ ${action-x} ] && exit 0 || ENTER2CONTINUE # esac @@ -115,24 +112,18 @@ INSTALL_RMM() { } INSTALL_S1() { - read -n 1 -p "Are you sure you wish to install the SentinelOne Agent (Y/n)?" choice - case "$choice" in - [Nn]) MAIN_MENU;; - * ) - echo - - echo -en "${idsCL[LightYellow]}Paste the customers SentinelOne Site Token: ${idsCL[Default]}" - read -e s1token - cd /tmp - wget "https://git.schroedercity.com/TAI/TA-ProxMenu/raw/branch/main/SentinelAgent_linux_x86_64_v25_3_2_11.deb" - dpkg -i ./SentinelAgent_linux_x86_64*.deb - /opt/sentinelone/bin/sentinelctl management token set ${s1token} - /opt/sentinelone/bin/sentinelctl control start - rm -f ./SentinelAgent_linux_x86_64*.deb - - echo -e "\n${idsCL[Green]}SentinelOne Agent has been installed. Make sure its added to a \"DETECT ONLY\" policy${idsCL[Default]}" - [ ${action-x} ] && exit 0 || ENTER2CONTINUE - esac + echo + echo -en "${idsCL[LightYellow]}Paste the customers SentinelOne Site Token: ${idsCL[Default]}" + read -e s1token + cd /tmp + wget "https://git.schroedercity.com/TAI/TA-ProxMenu/raw/branch/main/SentinelAgent_linux_x86_64_v25_3_2_11.deb" + dpkg -i ./SentinelAgent_linux_x86_64*.deb + /opt/sentinelone/bin/sentinelctl management token set ${s1token} + /opt/sentinelone/bin/sentinelctl control start + rm -f ./SentinelAgent_linux_x86_64*.deb + + echo -e "\n${idsCL[Green]}SentinelOne Agent has been installed. Make sure its added to a \"DETECT ONLY\" policy${idsCL[Default]}" + [ ${action-x} ] && exit 0 || ENTER2CONTINUE } INSTALL_OMSA() { @@ -205,9 +196,9 @@ DETECT_CPU(){ read -n 1 choice case "$choice" in [Yy]) - sed -i "/cpu:/c cpu: $(proxclmc --list-only)" /etc/pve/nodes/*/qemu-server/*.conf - echo - echo -e "\n${idsCL[Green]}All VM's have been reconfigured\n${idsCL[LightCyan]}This will require the VM's to be powered off and then turned back on in order to take effect${idsCL[Default]}" + sed -i "/cpu:/c cpu: $(proxclmc --list-only)" /etc/pve/nodes/*/qemu-server/*.conf + echo + echo -e "\n${idsCL[Green]}All VM's have been reconfigured\n${idsCL[LightCyan]}This will require the VM's to be powered off and then turned back on in order to take effect${idsCL[Default]}" ;; *) echo;; esac @@ -215,6 +206,19 @@ DETECT_CPU(){ [ ${action-x} ] && exit 0 || ENTER2CONTINUE } +RESTART_PVE_SERVICES(){ + echo -en "${idsCL[LightCyan]}Would you like to set '${idsCL[LightGreen]}cpu: $(proxclmc --list-only)${idsCL[LightCyan]}' on all VMs (y/N)?${idsCL[Default]} " + read -n 1 choice + case "$choice" in + [Yy]) echo + systemctl restart pve-cluster pvedaemon pvestatd pveproxy + echo;; + *) echo;; + + echo -e "\n${idsCL[Green]}This host's services have been restarted${idsCL[Default]}" + [ ${action-x} ] && exit 0 || ENTER2CONTINUE +} + MAIN_MENU() { while : do @@ -227,6 +231,8 @@ MAIN_MENU() { echo -e "---------------------------------------------------------------------------" echo + echo -e " [${idsCL[LightYellow]}0${idsCL[Default]}] ${idsCL[White]}Detect CPU-Arch for Live Migrations${idsCL[Default]}" + echo -en " [${idsCL[LightYellow]}1${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 @@ -278,10 +284,9 @@ MAIN_MENU() { echo -e " [${idsCL[LightYellow]}9${idsCL[Default]}] ${idsCL[White]}Download the current Win-VirtIO drivers to 'local' on this host${idsCL[Default]}" fi - echo - echo -e " [${idsCL[LightYellow]}0${idsCL[Default]}] ${idsCL[White]}Detect CPU-Arch for Live Migrations${idsCL[Default]}" echo echo + echo -e " [${idsCL[LightYellow]}R0${idsCL[Default]}] ${idsCL[White]}Restart Proxmox Services${idsCL[Default]}" echo -e " [${idsCL[LightYellow]}Q${idsCL[Default]}] ${idsCL[White]}Quit${idsCL[Default]}" echo echo @@ -300,6 +305,7 @@ MAIN_MENU() { [8]) INSTALL_OMSA;; [9]) DOWNLOAD_VIRTIO;; [0]) DETECT_CPU;; + [Rr]) RESTART_PVE_SERVICES;; [Qq]) EXIT1 exit 0;; *) echo "Thats an invaild option,";