syncthing-install.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 gnupg
  18. msg_ok "Installed Dependencies"
  19. msg_info "Installing Syncthing"
  20. curl -sL -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
  21. sh -c 'echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" > /etc/apt/sources.list.d/syncthing.list'
  22. $STD apt-get update
  23. $STD apt-get install -y syncthing
  24. $STD systemctl enable syncthing@root.service
  25. systemctl start syncthing@root.service
  26. sleep 5
  27. sed -i "{s/127.0.0.1:8384/0.0.0.0:8384/g}" /root/.config/syncthing/config.xml
  28. systemctl restart syncthing@root.service
  29. msg_ok "Installed Syncthing"
  30. motd_ssh
  31. customize
  32. msg_info "Cleaning up"
  33. $STD apt-get autoremove
  34. $STD apt-get autoclean
  35. msg_ok "Cleaned"