nocodb-install.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. msg_ok "Installed Dependencies"
  18. msg_info "Installing NocoDB"
  19. mkdir -p /opt/nocodb
  20. cd /opt/nocodb
  21. curl -s http://get.nocodb.com/linux-x64 -o nocodb -L
  22. chmod +x nocodb
  23. msg_ok "Installed NocoDB"
  24. msg_info "Creating Service"
  25. service_path="/etc/systemd/system/nocodb.service"
  26. echo "[Unit]
  27. Description=nocodb
  28. [Service]
  29. Type=simple
  30. Restart=always
  31. User=root
  32. WorkingDirectory=/opt/nocodb
  33. ExecStart=/opt/nocodb/./nocodb
  34. [Install]
  35. WantedBy=multi-user.target" >$service_path
  36. systemctl enable -q --now nocodb.service &>/dev/null
  37. msg_ok "Created Service"
  38. motd_ssh
  39. customize
  40. msg_info "Cleaning up"
  41. $STD apt-get autoremove
  42. $STD apt-get autoclean
  43. msg_ok "Cleaned"