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.

60 lines
2.3 KiB

  1. --- a/tools/seafile-admin
  2. +++ b/tools/seafile-admin
  3. @@ -449,9 +449,12 @@ workers = 3
  4. # Logging
  5. runtime_dir = os.path.dirname(__file__)
  6. -pidfile = os.path.join(runtime_dir, 'seahub.pid')
  7. +pidfile = '/var/run/seafile/seahub.pid'
  8. errorlog = os.path.join(runtime_dir, 'error.log')
  9. accesslog = os.path.join(runtime_dir, 'access.log')
  10. +
  11. +# for file upload, we need a longer timeout value (default is only 30s, too short)
  12. +timeout = 1200
  13. '''
  14. try:
  15. @@ -526,6 +529,7 @@ def check_django_version():
  16. def check_python_module(import_name, package_name=None, silent=False):
  17. + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "seahub.settings")
  18. package_name = package_name or import_name
  19. if not silent:
  20. info('checking %s' % package_name)
  21. @@ -785,7 +789,7 @@ def check_layout(args):
  22. conf[CONF_SEAFILE_DIR] = seafile_data_dir
  23. conf[CONF_SEAHUB_DIR] = seahub_dir
  24. conf[CONF_SEAHUB_CONF] = seahub_conf
  25. - conf[CONF_SEAHUB_PIDFILE] = os.path.join(runtime_dir, 'seahub.pid')
  26. + conf[CONF_SEAHUB_PIDFILE] = '/var/run/seafile/seahub.pid'
  27. conf[CONF_SEAHUB_OUTLOG] = os.path.join(runtime_dir, 'access.log')
  28. conf[CONF_SEAHUB_ERRLOG] = os.path.join(runtime_dir, 'error.log')
  29. @@ -836,10 +840,13 @@ 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:'
  35. + print
  36. + print highlight(' # /etc/init.d/seafile { start | stop | restart }')
  37. print
  38. - print highlight(' $ cd %s' % cwd)
  39. - print highlight(' $ %s { start | stop }' % SCRIPT_NAME)
  40. + print 'To start, stop or restart seahub:'
  41. + print
  42. + print highlight(' # /etc/init.d/seahub { start | stop | restart }')
  43. print
  44. print 'If you have any problem, refer to\n'
  45. print
  46. @@ -903,8 +910,7 @@ def start_seafile(args):
  47. def stop_seafile(dummy):
  48. info('Stopping seafile server')
  49. pkill('seafile-controller')
  50. - runtime_dir = os.path.join(cwd, 'seafile-server', 'runtime')
  51. - pidfile = os.path.join(runtime_dir, 'seahub.pid')
  52. + pidfile = '/var/run/seafile/seahub.pid'
  53. try:
  54. with open(pidfile, 'r') as fp:
  55. pid = fp.read().strip('\n ')