shinobi.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/usr/bin/env bash
  2. source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
  3. # Copyright (c) 2021-2023 tteck
  4. # Author: tteck (tteckster)
  5. # License: MIT
  6. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  7. function header_info {
  8. clear
  9. cat <<"EOF"
  10. _____ __ _ __ _
  11. / ___// /_ (_)___ ____ / /_ (_)
  12. \__ \/ __ \/ / __ \/ __ \/ __ \/ /
  13. ___/ / / / / / / / / /_/ / /_/ / /
  14. /____/_/ /_/_/_/ /_/\____/_.___/_/
  15. EOF
  16. }
  17. header_info
  18. echo -e "Loading..."
  19. APP="Shinobi"
  20. var_disk="8"
  21. var_cpu="2"
  22. var_ram="2048"
  23. var_os="ubuntu"
  24. var_version="22.04"
  25. var_version="20.04"
  26. variables
  27. color
  28. catch_errors
  29. function default_settings() {
  30. CT_TYPE="0"
  31. PW=""
  32. CT_ID=$NEXTID
  33. HN=$NSAPP
  34. DISK_SIZE="$var_disk"
  35. CORE_COUNT="$var_cpu"
  36. RAM_SIZE="$var_ram"
  37. BRG="vmbr0"
  38. NET="dhcp"
  39. GATE=""
  40. DISABLEIP6="no"
  41. MTU=""
  42. SD=""
  43. NS=""
  44. MAC=""
  45. VLAN=""
  46. SSH="no"
  47. VERB="no"
  48. echo_default
  49. }
  50. function update_script() {
  51. header_info
  52. if [[ ! -d /opt/Shinobi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
  53. msg_info "Updating Shinobi LXC"
  54. cd /opt/Shinobi
  55. sh UPDATE.sh
  56. pm2 flush
  57. pm2 restart camera
  58. pm2 restart cron
  59. msg_ok "Updated Shinobi LXC"
  60. exit
  61. }
  62. start
  63. build_container
  64. description
  65. msg_ok "Completed Successfully!\n"
  66. echo -e "${APP} Setup should be reachable by going to the following URL.
  67. ${BL}http://${IP}:8080/super${CL} \n"