Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
3.6 KiB

  1. #!/bin/bash
  2. # TigerOS script for the removal of unwanted major-specific packages
  3. #Author: Tim Zabel <tjz8659@rit.edu>
  4. # Check to see if the current user is root
  5. if [ $EUID != 0 ]
  6. then
  7. echo "Please run this script as root (sudo $@$0)."
  8. exit
  9. fi
  10. echo -e "Welcome to the TigerOS package removal script.\n
  11. This script will remove all files and packages installed for a specific major."
  12. echo -e "\n"
  13. sleep 5;
  14. PS3='Please enter the major for the courses you wish to remove: '
  15. options=("CS" "IT/WMC" "NSSA/CIT" "SE" "Quit")
  16. select opt in "${options[@]}"
  17. do
  18. case $opt in
  19. "CS")
  20. echo -e "Welcome to the TigerOS CS package removal script.\n
  21. This script will remove Intellij idea, PyCharm, prolog, racket, and JFLAP from your machine."
  22. while true; do
  23. read -p "Do you wish to continue? [y/n] " yn
  24. case $yn in
  25. [Yy]* ) break;;
  26. [Nn]* ) exit;;
  27. esac
  28. done
  29. # removal script cannot be done without the installer script implementing this section.
  30. ;;
  31. "IT/WMC")
  32. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  33. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  34. while true; do
  35. read -p "Do you wish to continue? [y/n] " yn
  36. case $yn in
  37. [Yy]* ) break;;
  38. [Nn]* ) exit;;
  39. esac
  40. done
  41. <<<<<<< HEAD
  42. sudo dnf -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  43. sudo semanage port -d -t mongod_port_t -p tcp 27017
  44. # WARNING --> port 27017 must be tested to make sure the above line of code closes it
  45. =======
  46. sudo dnf remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  47. semanage port -d -t mongod_port_t -p tcp 27017
  48. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  49. # jGrasp installer script must be implemented before it can be removed.
  50. >>>>>>> 0af9527f0b706733ffa103ccb634d93f08c506f5
  51. ;;
  52. "NSSA/CIT")
  53. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  54. This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine."
  55. while true; do
  56. read -p "Do you wish to continue [y/n] " yn
  57. case $yn in
  58. [Yy]* ) break;;
  59. [Nn]* ) exit;;
  60. esac
  61. done
  62. sudo dnf -y remove wireshark python python3
  63. # WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove
  64. echo "Install finished."
  65. exit
  66. ;;
  67. "SE" )
  68. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  69. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  70. while true; do
  71. read -p "Do you wish to continue? [y/n] " yn
  72. case $yn in
  73. [Yy]* ) break;;
  74. [Nn]* ) exit;;
  75. esac
  76. done
  77. sudo dnf -y remove eclipse-jdt ruby sqlite
  78. # Spin and Alloy need to be implemented in installer script before removal.
  79. echo "All files have been removed."
  80. exit
  81. ;;
  82. "Quit")
  83. break
  84. ;;
  85. *)
  86. echo "Invalid Option."
  87. ;;
  88. esac
  89. done