lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

040-seafile-admin.patch (2565B)


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