leon / Install-script.sh
Created at Sun Mar 22 20:38:24 WIB 2020
Installation Script
Install-script.sh
Raw
#!/bin/bash
echo "=========================";
echo "Welcome to Auto Bash !";
echo "=========================";
echo "";

   echo "Mau install apa gan?"; echo "";
   echo "1) Nginx + PHP7.2 + PHP-FPM (For CentOS 7 Only)";
   echo "2) Jitsi Meet + Nginx (For Ubuntu 18.04 Only)";echo "";
   read -p "Pilih Nomer [1/2] : " opsi; echo "";

echo "Hanya bisa 1 User saja !"

read -p "Masukan User : " user; echo "";

echo "=================================";
echo "Gunakan Spasi sebagai Pemisah ! ";
echo "================================="; echo "";

for hostname in $(read -p "Masukan IP : " ip; echo $ip;);
do
   case $opsi in
   1) ssh -l $user $hostname "curl "https://git.leon36.web.id/gist/leon/308d73d9a17d6c90f7c4786011e52d9a/raw/master/Install-Nginx" | /bin/bash";;
   2) echo "Masih belum ada !";;
   *) echo "Kesalahan Input !"
   exit 1;;
   esac
done

echo "";

#while echo "Ulangi lagi ? (y/n) : "; $read -r INPUT;
while read -p "Ulangi Lagi ? (y/n) : " INPUT;
do
   if [ "$INPUT" = "y" ];
   then
      clear;
      curl "https://git.leon36.web.id/gist/leon/d2022249031d1a5cc427cd86f62a0f70/raw/master/Install-script.sh" | /bin/bash;
      #bash ssh.sh; break;
   elif [ "$INPUT " = "n" ];
   then
      echo "Selesai !~"; break;
   else
      echo "Selesai !~"; break;
   fi
done