Advertisement
ujiajah1

system_menu.sh

May 15th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.00 KB | None | 0 0
  1. #!/bin/bash
  2. clear
  3. menu=
  4. time=
  5. echo "======================||======================"
  6. echo "~ Hallo Selamat Datang Di System Menu Server ~"
  7. echo "======================||======================"
  8. echo "kalau mau install bmon aplikasi untuk monitoring system-bandwidth"
  9. echo "Ambil dari github ~ silahkan"
  10. echo "git clone https://github.com/puji122/bmon3.8-monitoring-bandwidth-system.git"
  11. echo "cd bmon"
  12. apt-get install build-essential make libconfuse-dev libnl-3-dev libnl-route-3-dev libncurses-dev pkg-config dh-autoreconf
  13. echo "cd bmon/---> ./autogen.sh"
  14. echo "cd bmon/---> ./configure"
  15. echo "cd bmon/--->  make && make install"
  16. echo "1: Lihat hostname Mesin"
  17. echo "2: Lihat Tanggal Dan Jam System"
  18. echo "3: Cek Kapasitas RAM"
  19. echo "4: Cek Kapasitas Hardisk"
  20. echo "5: Cek Untuk Service Lainnya"
  21. echo "6: Lihat Ip Address"
  22. echo "7: Cek Internet Connection (ping ke google.com)"
  23. echo "8: Melihat jumlah waktu pemakaian komputer "
  24. echo "9: User Information Dan Waktu Loggin"
  25. echo "10: Melihat system process and cpu"
  26. echo "11: Lihat Graphic System"
  27. echo "12: Monitoring Proxy-Server"
  28. echo "13: shutdown"
  29. echo "0: Keluar dari Program"
  30. until [ "$menu" = "0" ]; do
  31. echo -n "Pilih Menu Dengan memasukan Nomor Menu>"
  32. read menu
  33.  if [ "$menu" = "0" ]; then
  34.  echo "See you, Bye...." $exit
  35.  fi
  36.   case $menu in
  37.   1 ) hostname ;;
  38.   2 ) date ;;
  39.   3 ) free -m ;;
  40.   4 ) df -h ;;
  41.   5 ) apt-get update && apt-get upgrade -y
  42.       squid -k parse
  43.       squid -k reconfigure
  44.       /etc/init.d/squid restart
  45.       /etc/init.d/squid reload
  46.       # tambahkan untuk program/service yang lain
  47.       service apache2 restart ;;
  48.   6 ) ifconfig ;;
  49.   7 ) ping google.com ;;
  50.   8 ) uptime ;;
  51.   9 ) w ;;
  52.   10 ) top ;;
  53.   11 ) bmon ;;
  54.   12 ) tail -f /var/log/squid/access.log | ccze ;;
  55.   13 ) echo -n "Masukan Waktu/jam dan sesuaikan dengan jam diserver anda,Penulisan waktu/jam dalam format, (jam: 21:45)>"
  56.        read time
  57.        echo " Sesaat Lagi System Linux Akan Dimatikan $time"
  58.        shutdown -h $time ;;
  59.   esac
  60. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement