setup.sh 715 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. set -e
  3. if [ -f /seafile/.installed ];then
  4. echo " Already installed."
  5. exit
  6. fi
  7. # Get latest tarball and extract it
  8. cd /seafile
  9. echo "Extracting server binary ..."
  10. tar -xzf "/seafile-pro-server_${SEAFILE_VERSION}_x86-64.tar.gz"
  11. mkdir installed
  12. mv "/seafile-pro-server_${SEAFILE_VERSION}_x86-64.tar.gz" installed
  13. cd "/seafile/seafile-pro-server-${SEAFILE_VERSION}"
  14. # Setup seafile
  15. ulimit -n 30000
  16. ./setup-seafile-mysql.sh
  17. # Custom configurations
  18. mkdir -p /seafile/conf
  19. echo "ENABLE_RESUMABLE_FILEUPLOAD = True" >> /seafile/conf/seahub_settings.py
  20. mv /seafevents.conf /seafile/conf/
  21. # Launch setup
  22. ./seafile.sh start
  23. ./seahub.sh start
  24. ./seafile.sh stop
  25. ./seahub.sh stop
  26. touch /seafile/.installed