go2rtc.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. /____/
  16. EOF
  17. }
  18. header_info
  19. echo -e "Loading..."
  20. APP="go2rtc"
  21. var_disk="4"
  22. var_cpu="2"
  23. var_ram="2048"
  24. var_os="debian"
  25. var_version="11"
  26. variables
  27. color
  28. catch_errors
  29. function default_settings() {
  30. CT_TYPE="1"
  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/go2rtc ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
  53. msg_info "Updating $APP"
  54. systemctl stop go2rtc
  55. cd /opt/go2rtc
  56. rm go2rtc_linux_amd64
  57. wget -q https://github.com/AlexxIT/go2rtc/releases/latest/download/go2rtc_linux_amd64
  58. chmod +x go2rtc_linux_amd64
  59. systemctl start go2rtc
  60. msg_ok "Updated $APP"
  61. exit
  62. }
  63. start
  64. build_container
  65. description
  66. msg_ok "Completed Successfully!\n"
  67. echo -e "${APP} should be reachable by going to the following URL.
  68. ${BL}http://${IP}:1984${CL} \n"