Advertisement
shutdown57

AUTIDZ - Alinko software utils installer

Apr 10th, 2018
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.46 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # AUTIDZ - Sofware utils installer alinko version.
  4. # Author : shutdown57 < alinkokomansuby@gmail.com >
  5. # Date modified : 13 Mei 2018
  6. # Version : 1.0
  7. #
  8.  
  9. m="\033[1;31m"
  10. k="\033[1;33m"
  11. h="\033[1;32m"
  12. b="\033[1;34m"
  13. bl="\033[0;34m"
  14. n="\033[1;0m"
  15.  
  16. s57_cekonek(){
  17. clear
  18. echo "Checking internet Connection..."
  19. ping 8.8.8.8 -c 3 > /dev/null 2>&1
  20. if [[ $? -eq 0 ]]; then
  21. echo -e $h"[+] Yokatta ! You Are Online !"$n
  22. sleep 2
  23. else
  24. echo -e $m"[-] Gomennasai.. You Are Offline :( OR You internet to slow.."
  25. sleep 3
  26. s57_main__
  27. fi
  28. }
  29. s57_alert()
  30. {
  31.     echo ""
  32.     echo -e ${b}"[!]${n}[`date +%H:%m:%S`] ${1} ... ~ ${bl}./shutdown57${n}"
  33.     echo ""
  34. }
  35. s57_server_utils__()
  36. {
  37.     s57_cekonek
  38.     s57_alert "Installing Apache2"
  39.     apt-get install apache2 -y
  40.     s57_alert "Checking apache2"
  41.     cat /etc/apache2/apache2.conf > /dev/null 2>&1
  42.     if [[ $? -eq 0 ]]; then
  43.         echo -e ${h}"[+] Apache2 Installed."${n}
  44.     else
  45.         echo -e ${m}"[-] Apache2 Not installed."${n}
  46.         exit
  47.     fi
  48.     s57_alert "Adding Repository for php"
  49.     add-apt-repository ppa:ondrej/php
  50.     s57_alert "Updating system"
  51.     apt-get update -y
  52.     s57_alert "Installing PHP5.6 && PHP7.0 "
  53.     apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0 -y
  54.     s57_alert "Creating info.php "
  55.     echo "<?php" >> /var/www/html/info.php
  56.     echo "phpinfo();" >> /var/www/html/info.php
  57.     echo "# by : alinko" >> /var/www/html/info.php
  58.     echo "?>" >> /var/www/html/info.php
  59.     xdg-open "http://localhost/info.php" >> /dev/null 2>&1
  60.     s57_alert "Installing mariadb-server"
  61.     apt-get install mariadb-server -y
  62.     s57_alert "MySQL Installation secure"
  63.     mysql_secure_installation
  64.     s57_alert "Installing phpmyadmin"
  65.     apt-get install phpmyadmin -y
  66.     s57_alert "Activating mod rewrite "
  67.     a2enmod rewrite
  68.     s57_alert "Restarting apache2"
  69.     /etc/init.d/apache2 restart
  70.     echo ""
  71.     echo "~ DONE ~"
  72.     sleep 2
  73. }
  74. s57_sublime__()
  75. {
  76.     s57_cekonek
  77.     s57_alert "Downloading Repository Sublime Text"
  78.     wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | apt-key add -
  79.     s57_alert "Installing dependencies"
  80.     apt-get install apt-transport-https -y
  81.     s57_alert "Adding Repository Sublime Text"
  82.     echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
  83.     s57_alert "Updating system"
  84.     apt-get update -y
  85.     s57_alert "Installing sublime-text"
  86.     apt-get install sublime-text -y
  87.     echo ""
  88.     echo "~ DONE ~"
  89.     sleep 2
  90. }
  91. s57_atom__()
  92. {
  93.     s57_cekonek
  94.     s57_alert "Downloading Repository Atom"
  95.     curl -L https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
  96.     sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
  97.     s57_alert "Updating system"
  98.     apt-get update -y
  99.     s57_alert "Installing atom"
  100.     apt-get install atom -y
  101.     echo ""
  102.     echo "~ DONE ~"
  103.     sleep 2
  104. }
  105. s57_mv__()
  106. {
  107.     s57_cekonek
  108.     s57_alert "Installing mpv from Repository"
  109.     apt-get install mpv -y
  110.     s57_alert "Installing moc from Repository"
  111.     apt-get install moc -y
  112.     echo ""
  113.     echo "~ DONE ~"
  114.     echo ""
  115.     sleep 2
  116. }
  117. s57_usu__()
  118. {
  119.     s57_cekonek
  120.     s57_alert "Installing ubuntu-restricted-extras "
  121.     read -p "Ini akan memakan waktu yang cukup lama, apa anda ingin melanjutkan? [Y/n]" yn
  122.     if [[ $yn == "Y" || $yn == "" || $yn == "y" ]]; then
  123.         apt-get install ubuntu-restricted-extras -y
  124.     fi
  125.     echo ""
  126.     echo "~ DONE ~"
  127.     sleep 2
  128. }
  129. s57_banner()
  130. {
  131.     clear
  132.     printf "${k}
  133.  
  134.    _         _   _     _    
  135.   / \  _   _| |_(_) __| |____
  136.  / _ \| | | | __| |/ _' |_  /
  137. / ___ \ |_| | |_| | (_| |/ /
  138. /_/   \_\__,_|\__|_|\__,_/___|
  139. ${n}
  140.  
  141. +------ [ ${b}Alinko Priv8 Software utils.${n}
  142. +----- [ ${k}Version :${n} 1.0
  143.  +---- [ ${m}Installer for fast work.${n}
  144.   +--- [ ${h}DEBIAN & UBUNTU BASED ${n}
  145.  
  146. => { 1 } WebDB Server Full.
  147. => { 2 } Sublime Text
  148. => { 3 } Atom
  149. => { 4 } Music & Video Player (mpv,mocp)
  150. => { 5 } Ubuntu Software Utils.
  151. "
  152. }
  153. s57_main__(){
  154.  
  155. s57_banner
  156.  
  157. read -p "shutdown57 >>" aut
  158. if [[ $aut == 1 ]]; then
  159.  
  160.     s57_server_utils__
  161.     s57_main__
  162.  
  163. elif [[ $aut == 2 ]]; then
  164.  
  165.     s57_sublime__
  166.     s57_main__
  167.  
  168. elif [[ $aut == 3 ]]; then
  169.  
  170.     s57_atom__
  171.     s57_main__
  172.  
  173. elif [[ $aut == 4 ]]; then
  174.  
  175.     s57_mv__
  176.     s57_main__
  177.  
  178. elif [[ $aut == 5 ]]; then
  179.  
  180.     s57_usu__
  181.     s57_main__
  182.  
  183. elif [[ $aut == 0 ]]; then
  184.  
  185.     s57_init__
  186.     s57_main__
  187.  
  188. else
  189.     s57_main__
  190. fi
  191. }
  192.  
  193. if [[ `whoami` == "root" ]]; then
  194.     s57_main__
  195. else
  196.     echo "[JALANKAN SCRIPT INI DENGAN SUPER USER / ROOT ]"
  197. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement