lidarr-install.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 sqlite3
  18. $STD apt-get install -y libchromaprint-tools
  19. $STD apt-get install -y mediainfo
  20. msg_ok "Installed Dependencies"
  21. msg_info "Installing Lidarr"
  22. mkdir -p /var/lib/lidarr/
  23. chmod 775 /var/lib/lidarr/
  24. $STD wget --content-disposition 'https://lidarr.servarr.com/v1/update/master/updatefile?os=linux&runtime=netcore&arch=x64'
  25. $STD tar -xvzf Lidarr.master.*.tar.gz
  26. mv Lidarr /opt
  27. chmod 775 /opt/Lidarr
  28. msg_ok "Installed Lidarr"
  29. msg_info "Creating Service"
  30. cat <<EOF >/etc/systemd/system/lidarr.service
  31. [Unit]
  32. Description=Lidarr Daemon
  33. After=syslog.target network.target
  34. [Service]
  35. UMask=0002
  36. Type=simple
  37. ExecStart=/opt/Lidarr/Lidarr -nobrowser -data=/var/lib/lidarr/
  38. TimeoutStopSec=20
  39. KillMode=process
  40. Restart=on-failure
  41. [Install]
  42. WantedBy=multi-user.target
  43. EOF
  44. systemctl -q daemon-reload
  45. systemctl enable --now -q lidarr
  46. msg_ok "Created Service"
  47. motd_ssh
  48. customize
  49. msg_info "Cleaning up"
  50. rm -rf Lidarr.master.*.tar.gz
  51. $STD apt-get autoremove
  52. $STD apt-get autoclean
  53. msg_ok "Cleaned"