You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.0 KiB

  1. diff -rupN seafile-3.1.7-server.orig/tools/seafile-admin seafile-3.1.7-server/tools/seafile-admin
  2. --- seafile-3.1.7-server.orig/tools/seafile-admin 2014-10-16 05:30:04.000000000 +0200
  3. +++ seafile-3.1.7-server/tools/seafile-admin 2014-12-12 12:09:00.703175935 +0100
  4. @@ -416,13 +416,15 @@ def create_gunicorn_conf():
  5. content = '''\
  6. import os
  7. daemon = True
  8. -workers = 3
  9. +workers = 1
  10. +threads = 3
  11. # Logging
  12. runtime_dir = os.path.dirname(__file__)
  13. -pidfile = os.path.join(runtime_dir, 'seahub.pid')
  14. +pidfile = '/var/run/seafile/seahub.pid'
  15. errorlog = os.path.join(runtime_dir, 'error.log')
  16. -accesslog = os.path.join(runtime_dir, 'access.log')
  17. +# uncomment if you need access logging (works only in fastcgi mode)
  18. +#accesslog = os.path.join(runtime_dir, 'access.log')
  19. '''
  20. try:
  21. with open(confpath, 'w') as fp:
  22. @@ -607,6 +609,7 @@ def start_seahub_gunicorn():
  23. 'gunicorn_django',
  24. '-c', conf[CONF_SEAHUB_CONF],
  25. '-b', '0.0.0.0:%s' % conf[CONF_SEAHUB_PORT],
  26. + '-t', '120',
  27. ]
  28. info('Starting seahub...')
  29. @@ -738,10 +741,9 @@ def setup_seafile(args):
  30. print '-----------------------------------------------------------------'
  31. print '-----------------------------------------------------------------'
  32. print
  33. - print 'To start/stop seafile server:'
  34. + print 'To start, stop or restart seafile server, please run as root:'
  35. print
  36. - print highlight(' $ cd %s' % cwd)
  37. - print highlight(' $ %s { start | stop }' % SCRIPT_NAME)
  38. + print highlight(' # /etc/init.d/seafile { start | stop | restart }')
  39. print
  40. print 'If you have any problem, refer to\n'
  41. print
  42. @@ -802,8 +804,7 @@ def start_seafile(args):
  43. def stop_seafile(dummy):
  44. info('Stopping seafile server')
  45. pkill('seafile-controller')
  46. - runtime_dir = os.path.join(cwd, 'seafile-server', 'runtime')
  47. - pidfile = os.path.join(runtime_dir, 'seahub.pid')
  48. + pidfile = '/var/run/seafile/seahub.pid'
  49. try:
  50. with open(pidfile, 'r') as fp:
  51. pid = fp.read().strip('\n ')