owncast-install.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2021-2023 tteck
  3. # Author: tteck (tteckster)
  4. # License: MIT
  5. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  6. source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
  7. color
  8. verb_ip6
  9. catch_errors
  10. setting_up_container
  11. network_check
  12. update_os
  13. msg_info "Installing Dependencies (Patience)"
  14. $STD apt-get install -y curl
  15. $STD apt-get install -y sudo
  16. $STD apt-get install -y mc
  17. $STD apt-get install -y ffmpeg
  18. msg_ok "Installed Dependencies"
  19. msg_info "Installing Owncast"
  20. mkdir /opt/owncast
  21. cd /opt/owncast
  22. wget -q $(curl -s https://api.github.com/repos/owncast/owncast/releases/latest | grep download | grep linux-64bit | cut -d\" -f4)
  23. $STD unzip owncast*.zip
  24. rm owncast*.zip
  25. msg_ok "Installed Owncast"
  26. msg_info "Creating Service"
  27. cat <<EOF >/etc/systemd/system/owncast.service
  28. [Unit]
  29. Description=Owncast
  30. After=syslog.target network-online.target
  31. [Service]
  32. ExecStart=/opt/owncast/./owncast
  33. WorkingDirectory=/opt/owncast
  34. Restart=always
  35. [Install]
  36. WantedBy=multi-user.target
  37. EOF
  38. systemctl enable -q --now owncast.service
  39. msg_ok "Created Service"
  40. motd_ssh
  41. customize
  42. msg_info "Cleaning up"
  43. $STD apt-get autoremove
  44. $STD apt-get autoclean
  45. msg_ok "Cleaned"