From 545a542dbe14b9ab77f843f7354ab17c778e090f Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 17 Jul 2023 22:34:11 -0500 Subject: [PATCH] Update linupx-scripts.sh --- linupx-scripts.sh | 102 +++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/linupx-scripts.sh b/linupx-scripts.sh index 480a820..137b1ea 100755 --- a/linupx-scripts.sh +++ b/linupx-scripts.sh @@ -80,7 +80,7 @@ UPDATE1() { fi touch "${FOLDER}/lastrun" echo - echo -e "${Green}Updates have completed${Color_Off}" + echo -e "${idsCL[Green]}Updates have completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -108,7 +108,7 @@ UPDATE2() { touch "${FOLDER}/lastrun" echo - echo -e "${Green}Updated Upgrades have completed${Color_Off}" + echo -e "${idsCL[Green]}Updated Upgrades have completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -147,9 +147,9 @@ UPDATE3() { fi touch "${FOLDER}/lastrun" echo - echo -e "${Green}Updates have completed${Color_Off}" + echo -e "${idsCL[Green]}Updates have completed${idsCL[Default]}" if [ "$autorun_restart_after" = true ] || [ "$restart_flag" = true ]; then - echo -e "${BOrange}Rebooting now...${Color_Off}" + echo -e "${BOrange}Rebooting now...${idsCL[Default]}" sleep 3 /sbin/shutdown -r now fi @@ -177,9 +177,9 @@ UPDATE4() { fi touch "${FOLDER}/lastrun" echo - echo -e "${Green}Updates have completed${Color_Off}" + echo -e "${idsCL[Green]}Updates have completed${idsCL[Default]}" if [ "$autorun_restart_after" = true ] || [ "$restart_flag" = true ]; then - echo -e "${BOrange}Rebooting now...${Color_Off}" + echo -e "${BOrange}Rebooting now...${idsCL[Default]}" sleep 3 /sbin/shutdown -r now fi @@ -195,7 +195,7 @@ DISTUPGRADE() { AUTOREMOVE fi echo - echo -e "${Green}Dist Upgrades has completed${Color_Off}" + echo -e "${idsCL[Green]}Dist Upgrades has completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -212,7 +212,7 @@ PIPUPGRADE() { pip3 list --outdated --format=json | jq -r '.[] | "\(.name)==\(.latest_version)"' | xargs -n1 pip3 install -U fi echo - echo -e "${Green}Python-Pip Upgrades has completed${Color_Off}" + echo -e "${idsCL[Green]}Python-Pip Upgrades has completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -242,7 +242,7 @@ DRYRUN1() { $APTFUNC check-update fi echo - echo -e "${Green}Upgrade dry-run has completed${Color_Off}" + echo -e "${idsCL[Green]}Upgrade dry-run has completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -253,7 +253,7 @@ DRYRUN2() { $APTFUNC dist-upgrade --dry-run fi echo - echo -e "${Green}Dist-Upgrade dry-run has completed${Color_Off}" + echo -e "${idsCL[Green]}Dist-Upgrade dry-run has completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" } @@ -300,7 +300,7 @@ WEBMIN_INSTALL() { echo bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-webmin.sh) echo - echo -e "${Green}Webmin has been Installed${Color_Off}" + echo -e "${idsCL[Green]}Webmin has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -313,7 +313,7 @@ GLANCES_INSTALL() { echo bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-glances.sh) echo - echo -e "${Green}Glances has been Installed${Color_Off}" + echo -e "${idsCL[Green]}Glances has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -326,7 +326,7 @@ MYSQLBU_INSTALL() { echo bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-mysqlbu.sh) echo - echo -e "${Green}MySQL-BU has been Installed${Color_Off}" + echo -e "${idsCL[Green]}MySQL-BU has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -339,7 +339,7 @@ DSMON_INSTALL() { echo bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/branch/master/install-dsmon.sh) echo - echo -e "${Green}DSMon has been Installed${Color_Off}" + echo -e "${idsCL[Green]}DSMon has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -351,14 +351,14 @@ REMOVEFLOPPY() { sudo rmmod floppy sudo update-initramfs -u echo - echo -e "${Green}Floppy has been removed, you must reboot to take effect.${Color_Off}" + echo -e "${idsCL[Green]}Floppy has been removed, you must reboot to take effect.${idsCL[Default]}" echo read -e -n 1 -p $'\e[1;31mWould you like to reboot now (y/N)?\e[0m' choice case "$choice" in [Yy]) echo echo - echo -e "${BOrange}The system is now rebooting...${Color_Off}" + echo -e "${BOrange}The system is now rebooting...${idsCL[Default]}" if [ "$EUID" -ne 0 ]; then sudo shutdown -r now else shutdown -r now; fi sleep 60 @@ -366,7 +366,7 @@ REMOVEFLOPPY() { * ) SCRIPT_MENU;; esac else - echo -e "${Green}Floppy has already been removed.${Color_Off}" + echo -e "${idsCL[Green]}Floppy has already been removed.${idsCL[Default]}" echo read -n 1 -s -p "Press any key to continue" fi @@ -384,7 +384,7 @@ NETDATA_INSTALL() { rm -Rf /var/cache/netdata /var/lib/netdata /etc/logrotate.d/netdata /etc/default/netdata /etc/netdata /etc/init.d/netdata /etc/systemd/system/netdata.service /etc/systemd/system/multi-user.target.wants/netdata.service systemctl daemon-reload echo - echo -e "${Green}Netdata Agent has been Removed${Color_Off}" + echo -e "${idsCL[Green]}Netdata Agent has been Removed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; * ) INSTALL_MENU;; @@ -399,7 +399,7 @@ NETDATA_INSTALL() { echo wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token GKUQidqs3HAdWdyLgYjjHpI6k0W09TPxv4hyEvESuNKF9Xy0SKBvOr7BokNZHn6j7GUHlfc_R8UQp-dEXPAoRHdEmbSRCGOXX4XiOfMRazUk6Dd_3qjIdqJu9YqDaL2jw1hSTzw --claim-url https://app.netdata.cloud echo - echo -e "${Green}Netdata Agent has been Installed${Color_Off}" + echo -e "${idsCL[Green]}Netdata Agent has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -497,7 +497,7 @@ IPERF_INSTALL() { ldconfig echo - echo -e "${Green}iPerf has been Installed${Color_Off}" + echo -e "${idsCL[Green]}iPerf has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -516,7 +516,7 @@ CHANGECOPYCERTS_INSTALL() { /opt/copycerts.sh echo - echo -e "${Green}copycerts.sh has been updated${Color_Off}" + echo -e "${idsCL[Green]}copycerts.sh has been updated${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -535,9 +535,9 @@ SPEEDTEST_INSTALL() { $APTFUNC install -y speedtest echo - echo -e "${Green}SpeedTest has been Installed${Color_Off}" + echo -e "${idsCL[Green]}SpeedTest has been Installed${idsCL[Default]}" echo - echo -e "${LightCyan}To run, use the command: speedtest${Color_Off}" + echo -e "${LightCyan}To run, use the command: speedtest${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -559,7 +559,7 @@ URBACKUP_INSTALL() { rm -f $TF echo - echo -e "${Green}UrBackup Client has been Installed${Color_Off}" + echo -e "${idsCL[Green]}UrBackup Client has been Installed${idsCL[Default]}" echo if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; @@ -573,7 +573,7 @@ X11VNC_INSTALL() { echo bash <(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/install-vnc.sh) echo - echo -e "${Green}x11vnc has been Installed${Color_Off}" + echo -e "${idsCL[Green]}x11vnc has been Installed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue";; esac @@ -633,7 +633,7 @@ PYTHON3UPGRADE(){ update-alternatives --config python3 echo - echo -e "${Green}Python3.10 Upgrade has been Completed${Color_Off}" + echo -e "${idsCL[Green]}Python3.10 Upgrade has been Completed${idsCL[Default]}" if [ ${action-x} ]; then exit 0; fi read -n 1 -s -p "Press any key to continue" SCRIPT_MENU;; @@ -646,7 +646,7 @@ POSTFIX_INSTALL(){ INSTALL_MENU } BASHRC_INSTALL(){ - echo -e "${Green}Installing root/.bashrc${Color_Off}" + echo -e "${idsCL[Green]}Installing root/.bashrc${idsCL[Default]}" /usr/bin/wget -O ~/.bashrc https://git.schroedercity.com/voltron/Misc-Scripts/raw/branch/master/bashrc read -n 1 -s -p "Press any key to continue" INSTALL_MENU @@ -675,9 +675,9 @@ COPYCERTS_UPDATE(){ /opt/copycerts.sh echo - echo -e "${Green}copycerts.sh has been updated${Color_Off}" + echo -e "${idsCL[Green]}copycerts.sh has been updated${idsCL[Default]}" else - echo -e "${Blue}copycerts.sh not found${Color_Off}" + echo -e "${Blue}copycerts.sh not found${idsCL[Default]}" fi [ ${1-x} ] && exit 0 || read -n 1 -s -p "Press any key to continue" } @@ -685,7 +685,7 @@ COPYCERTS_UPDATE(){ UPDATEREPOKEYS(){ apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com echo - echo -e "${Green}APT Repo Keys have been updated${Color_Off}" + echo -e "${idsCL[Green]}APT Repo Keys have been updated${idsCL[Default]}" read -n 1 -s -p "Press any key to continue" } @@ -812,12 +812,12 @@ SCRIPT_MENU() { do clear echo - echo -e " ${LGreen}LinUPx - L I N U X U P D A T E S C R I P T S${Color_Off} ${DGray}(ver-${VERS})${Color_Off}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" - echo -e "Hostname: ${BBlue}$(hostname -s)${Color_Off}" - echo -e "Domain: ${BBlue}$(hostname -d)${Color_Off}" + echo -e " ${idsCL[LightGreen]}LinUPx - L I N U X U P D A T E S C R I P T S${idsCL[Default]} ${DGray}(ver-${VERS})${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" + echo -e "Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}" + echo -e "Domain: ${idsCL[Cyan]}$(hostname -d)${idsCL[Default]}" echo - echo -e "Updates last run on: ${Green}${LASTRUND} ${LASTRUNT}${Color_Off}" + echo -e "Updates last run on: ${idsCL[Green]}${LASTRUND} ${LASTRUNT}${idsCL[Default]}" echo "---------------------------------------------------------------------------" OS=($(detect_os)) width=14 @@ -826,7 +826,7 @@ SCRIPT_MENU() { printf "%-${width}s: %s\n" "Derivative" "${OS[2]}" printf "%-${width}s: %s\n" "Version" "${OS[3]}" printf "%-${width}s: %s\n" "Codename/Rev" "${OS[4]}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" echo echo " [1] Check for Updates/Upgrades" echo "*[2] Run Updates" @@ -854,7 +854,7 @@ SCRIPT_MENU() { echo " [Q] Quit" echo echo - echo -e -n "${BOrange}Please select an [ActionItem] from above:${Color_Off} " + echo -e -n "${idsCL[Yellow]}Please select an [ActionItem] from above:${idsCL[Default]} " read -n 1 opt echo case $opt in @@ -895,12 +895,12 @@ MISC_MENU() { do clear echo - echo -e " ${LGreen}LinUPx - L I N U X U P D A T E S C R I P T S${Color_Off} ${DGray}(ver-${VERS})${Color_Off}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" - echo -e "Hostname: ${BBlue}$(hostname -s)${Color_Off}" - echo -e "Domain: ${BBlue}$(hostname -d)${Color_Off}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" - echo -e "\n ${Green}MISC/OTHER SCRIPTS${Color_Off}\n" + echo -e " ${idsCL[LightGreen]}LinUPx - L I N U X U P D A T E S C R I P T S${idsCL[Default]} ${idsCL[White]}(ver-${VERS})${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" + echo -e "Hostname: ${idsCL[Cyan]}$(hostname -s)${idsCL[Default]}" + echo -e "Domain: ${idsCL[Cyan]}$(hostname -d)${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" + echo -e "\n ${idsCL[Green]}MISC/OTHER SCRIPTS${idsCL[Default]}\n" echo " [1] Reconfigure Network" echo " [2] Remove Floppy from VM" echo " [3] Fix multipath/vmware issue" @@ -918,7 +918,7 @@ MISC_MENU() { echo " [Q] Quit" echo echo - echo -e -n "${BOrange}Please select a [#] from above:${Color_Off} " + echo -e -n "${BOrange}Please select a [#] from above:${idsCL[Default]} " read -n 1 opt echo case $opt in @@ -948,12 +948,12 @@ INSTALL_MENU() { do clear echo - echo -e " ${LGreen}LinUPx - L I N U X U P D A T E S C R I P T S${Color_Off} ${DGray}(ver-${VERS})${Color_Off}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" - echo -e "Hostname: ${BBlue}$(hostname -s)${Color_Off}" - echo -e "Domain: ${BBlue}$(hostname -d)${Color_Off}" - echo -e "${LGreen}---------------------------------------------------------------------------${Color_Off}" - echo -e "\n ${Green}INSTALLATION SCRIPTS${Color_Off}\n" + echo -e " ${idsCL[LightGreen]}LinUPx - L I N U X U P D A T E S C R I P T S${idsCL[Default]} ${DGray}(ver-${VERS})${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" + echo -e "Hostname: ${BBlue}$(hostname -s)${idsCL[Default]}" + echo -e "Domain: ${BBlue}$(hostname -d)${idsCL[Default]}" + echo -e "${idsCL[LightGreen]}---------------------------------------------------------------------------${idsCL[Default]}" + echo -e "\n ${idsCL[Green]}INSTALLATION SCRIPTS${idsCL[Default]}\n" echo " [1] Install Webmin" echo " [2] Install Glances" echo " [3] Install x11vnc" @@ -975,7 +975,7 @@ INSTALL_MENU() { echo " [Q] Quit" echo echo - echo -e -n "${BOrange}Please select a [#] from above:${Color_Off} " + echo -e -n "${BOrange}Please select a [#] from above:${idsCL[Default]} " read -n 1 opt echo case $opt in