tautulli-install.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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"
  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 git
  18. $STD apt-get install -y pip
  19. msg_ok "Installed Dependencies"
  20. msg_info "Installing Tautulli"
  21. cd /opt
  22. $STD git clone https://github.com/Tautulli/Tautulli.git
  23. python3 -m pip install -q -r /opt/Tautulli/requirements.txt
  24. $STD pip install pyopenssl
  25. msg_ok "Installed Tautulli"
  26. msg_info "Creating Service"
  27. cat <<EOF >/etc/systemd/system/tautulli.service
  28. [Unit]
  29. Description=Tautulli
  30. After=syslog.target network.target
  31. [Service]
  32. WorkingDirectory=/opt/Tautulli/
  33. Restart=on-failure
  34. RestartSec=5
  35. Type=simple
  36. ExecStart=/usr/bin/python3 /opt/Tautulli/Tautulli.py
  37. KillSignal=SIGINT
  38. TimeoutStopSec=20
  39. SyslogIdentifier=tautulli
  40. [Install]
  41. WantedBy=multi-user.target
  42. EOF
  43. systemctl enable -q --now tautulli
  44. msg_ok "Created Service"
  45. motd_ssh
  46. customize
  47. msg_info "Cleaning up"
  48. $STD apt-get autoremove
  49. $STD apt-get autoclean
  50. msg_ok "Cleaned"