dashy-install.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. msg_ok "Installed Dependencies"
  19. msg_info "Setting up Node.js Repository"
  20. $STD bash <(curl -fsSL https://deb.nodesource.com/setup_16.x)
  21. msg_ok "Set up Node.js Repository"
  22. msg_info "Installing Node.js"
  23. $STD apt-get install -y nodejs git make g++ gcc
  24. msg_ok "Installed Node.js"
  25. msg_info "Installing Yarn"
  26. $STD npm install --global yarn
  27. msg_ok "Installed Yarn"
  28. msg_info "Installing Dashy (Patience)"
  29. $STD git clone https://github.com/Lissy93/dashy.git
  30. cd /dashy
  31. $STD yarn
  32. export NODE_OPTIONS=--max-old-space-size=1000
  33. $STD yarn build
  34. msg_ok "Installed Dashy"
  35. msg_info "Creating Service"
  36. cat <<EOF >/etc/systemd/system/dashy.service
  37. [Unit]
  38. Description=dashy
  39. [Service]
  40. Type=simple
  41. WorkingDirectory=/dashy
  42. ExecStart=/usr/bin/yarn start
  43. [Install]
  44. WantedBy=multi-user.target
  45. EOF
  46. $STD systemctl enable dashy
  47. systemctl start dashy
  48. msg_ok "Created Service"
  49. motd_ssh
  50. customize
  51. msg_info "Cleaning up"
  52. $STD apt-get autoremove
  53. $STD apt-get autoclean
  54. msg_ok "Cleaned"