Advertisement
Guest User

postinstall

a guest
Jun 25th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [[ $EUID -ne 0 ]]; then
  4. echo "This script must be run as root"
  5. exit 1
  6. else
  7. #Update and Upgrade
  8. echo "Updating and Upgrading"
  9. apt-get update && sudo apt-get upgrade -y
  10.  
  11. sudo apt-get install dialog
  12. cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16)
  13. options=(1 "Sublime Text 3" off # any option can be set to default to "on"
  14. 2 "LAMP Stack" off
  15. 3 "Build Essentials" off
  16. 4 "Node.js" off
  17. 5 "Git" off
  18. 6 "Composer" off
  19. 7 "JDK 8" off
  20. 8 "Bleachbit" off
  21. 9 "Ubuntu Restricted Extras" off
  22. 10 "VLC Media Player" off
  23. 11 "Unity Tewak Tool" off
  24. 12 "Google Chrome" off
  25. 13 "Teamiewer" off
  26. 14 "Skype" off
  27. 15 "Paper GTK Theme" off
  28. 16 "Arch Theme" off
  29. 17 "Arc Icons" off
  30. 18 "Numix Icons" off)
  31. choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
  32. clear
  33. for choice in $choices
  34. do
  35. case $choice in
  36. 1)
  37. #Install Sublime Text 3*
  38. echo "Installing Sublime Text"
  39. add-apt-repository ppa:webupd8team/sublime-text-3 -y
  40. apt update
  41. apt install sublime-text-installer -y
  42. ;;
  43.  
  44. 2)
  45. #Install LAMP stack
  46. echo "Installing Apache"
  47. apt install apache2 -y
  48.  
  49. echo "Installing Mysql Server"
  50. apt install mysql-server -y
  51.  
  52. echo "Installing PHP"
  53. apt install php libapache2-mod-php php-mcrypt php-mysql -y
  54.  
  55. echo "Installing Phpmyadmin"
  56. apt install phpmyadmin -y
  57.  
  58. echo "Cofiguring apache to run Phpmyadmin"
  59. echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf
  60.  
  61. echo "Restarting Apache Server"
  62. service apache2 restart
  63. ;;
  64. 3)
  65. #Install Build Essentials
  66. echo "Installing Build Essentials"
  67. apt install -y build-essential
  68. ;;
  69.  
  70. 4)
  71. #Install Nodejs
  72. echo "Installing Nodejs"
  73. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  74. apt install -y nodejs
  75. ;;
  76.  
  77. 5)
  78. #Install git
  79. echo "Installing Git, please congiure git later..."
  80. apt install git -y
  81. ;;
  82. 6)
  83. #Composer
  84. echo "Installing Composer"
  85. EXPECTED_SIGNATURE=$(wget https://composer.github.io/installer.sig -O - -q)
  86. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  87. ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
  88.  
  89. if [ "$EXPECTED_SIGNATURE" = "$ACTUAL_SIGNATURE" ]
  90. then
  91. php composer-setup.php --quiet --install-dir=/bin --filename=composer
  92. RESULT=$?
  93. rm composer-setup.php
  94. else
  95. >&2 echo 'ERROR: Invalid installer signature'
  96. rm composer-setup.php
  97. fi
  98. ;;
  99. 7)
  100. #JDK 8
  101. echo "Installing JDK 8"
  102. apt install python-software-properties -y
  103. add-apt-repository ppa:webupd8team/java -y
  104. apt update
  105. apt install oracle-java8-installer -y
  106. ;;
  107. 8)
  108. #Bleachbit
  109. echo "Installing BleachBit"
  110. apt install bleachbit -y
  111. ;;
  112. 9)
  113. #Ubuntu Restricted Extras
  114. echo "Installing Ubuntu Restricted Extras"
  115. apt install ubunt-restricted-extras -y
  116. ;;
  117. 10)
  118. #VLC Media Player
  119. echo "Installing VLC Media Player"
  120. apt install vlc -y
  121. ;;
  122. 11)
  123. #Unity tweak tool
  124. echo "Installing Unity Tweak Tool"
  125. apt install unity-tweak-tool -y
  126. ;;
  127. 12)
  128.  
  129. #Chrome
  130. echo "Installing Google Chrome"
  131. wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
  132. sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
  133. apt-get update
  134. apt-get install google-chrome-stable -y
  135. ;;
  136. 13)
  137. #Teamviewer
  138. echo "Installing Teamviewer"
  139. wget http://download.teamviewer.com/download/teamviewer_i386.deb
  140. dpkg -i teamviewer_i386.deb
  141. apt-get install -f -y
  142. rm -rf teamviewer_i386.deb
  143. ;;
  144. 14)
  145.  
  146. #Skype for Linux
  147. echo "Installing Skype For Linux"
  148. apt install apt-transport-https -y
  149. curl https://repo.skype.com/data/SKYPE-GPG-KEY | apt-key add -
  150. echo "deb https://repo.skype.com/deb stable main" | tee /etc/apt/sources.list.d/skypeforlinux.list
  151. apt update
  152. apt install skypeforlinux -y
  153. ;;
  154. 15)
  155.  
  156. #Paper GTK Theme
  157. echo "Installing Paper GTK Theme"
  158. add-apt-repository ppa:snwh/pulp -y
  159. apt-get update
  160. apt-get install paper-gtk-theme -y
  161. apt-get install paper-icon-theme -y
  162. ;;
  163. 16)
  164. #Arc Theme
  165. echo "Installing Arc Theme"
  166. add-apt-repository ppa:noobslab/themes -y
  167. apt-get update
  168. apt-get install arc-theme -y
  169. ;;
  170. 17)
  171.  
  172. #Arc Icons
  173. echo "Installing Arc Icons"
  174. add-apt-repository ppa:noobslab/icons -y
  175. apt-get update
  176. apt-get install arc-icons -y
  177. ;;
  178. 18)
  179. #Numix Icons
  180. echo "Installing Numic Icons"
  181. apt-add-repository ppa:numix/ppa -y
  182. apt-get update
  183. apt-get install numix-icon-theme numix-icon-theme-circle -y
  184. ;;
  185. esac
  186. done
  187. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement