HEX
Server: Apache
System: Linux montechenligne.likuid.com 4.18.0-553.54.1.el8_10.x86_64 #1 SMP Tue May 27 22:49:52 EDT 2025 x86_64
User: logisdtech (1121)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: //bin/remove-display
#!/bin/bash

######
#
#
# Script to remove display
#
#
######

echo;
echo -e "\e[32mRemoving the Display and all Components\e[39m";
echo;
echo -e "\e[31mAttention - This action is IRREVERSIBLE\e[39m";
echo;
echo -e "Please Enter \e[31mYES\e[39m to remove the display from your system";

read removal

if [ "${removal}" = "YES" ];
        then
                echo;
                echo -e "\e[32mRemoving Display and all components in progress\e[39m";
                echo "Please wait ...";

		# Remove Motd Directory
                rm -rf /etc/motd.d/

		# Remove all executable files
                rm -rf /bin/change-banner
                rm -rf /bin/activate-banner
                rm -rf /bin/remove-banner
                rm -rf /bin/update-display
		rm -rf /bin/list-updates
	
		# Remove cron
                rm -rf /etc/cron.d/motd.cron

		# Remove Motd from profile
                sed -i '\|/etc/motd.d/motd.sh|d' /etc/profile

		# Remove virt-what from sudoers
		sed -i '\|ALL ALL=(ALL:ALL) NOPASSWD: /usr/sbin/virt-what|d' /etc/sudoers

                sleep 2
                echo;
                echo -e "\e[32mDisplay Removal Completed\e[39m";
                echo "All files were removed from your system."
                sleep 2
                rm -rf /bin/remove-display
                echo;
                exit

fi

echo;
echo "Wrong answer or case sensitive.";
echo;
echo "Removing Display has been cancelled.";
echo;
echo -e "\e[31mPlease try again ...\e[39m"
echo;


######
#
# End Remove Display Script
#
######