Skip to content

Commit

Permalink
Clean up run_server.py and add documentation about how to run.
Browse files Browse the repository at this point in the history
  • Loading branch information
killing committed Jan 28, 2016
1 parent d22089c commit 09d208b
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 306 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ This is the WebDAV server for seafile.

See [Seafile Server Manual](http://manual.seafile.com/extension/webdav.html) for details.

# Running

There are two templates for running seafdav:
- run.sh.template: This is for running seafdav on the default 8080 port with a built-in CherryPy server.
- run-fcgi.sh.template and seafdav.conf.template:
These two files are for running seafdav on fastcgi mode.

To run on 8080 port:

```
cp run.sh.template run.sh
```

Then change CCNET_CONF_DIR and SEAFILE_CONF_DIR to your Seafile server's settings.

To run fastcgi mode:

```
cp run-fcgi.sh.template run-fcgi.sh
cp seafdav.conf.template seafdav.conf
```

Then change CCNET_CONF_DIR and SEAFILE_CONF_DIR to your Seafile server's settings.

# Testing

Expand Down
11 changes: 11 additions & 0 deletions run-fcgi.sh.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

export CCNET_CONF_DIR=/data/data/ccnet
export SEAFILE_CONF_DIR=/data/data/seafile-data
export SEAFDAV_CONF=./seafdav.conf

TOP_DIR=$(python -c "import os; print os.path.dirname(os.path.realpath('$0'))")

cd "$TOP_DIR"

python -m wsgidav.server.run_server runfcgi --log-file seafdav.log --host=127.0.0.1 --port 8080
2 changes: 2 additions & 0 deletions seafdav.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[WEBDAV]
share_name = /seafdav
Loading

0 comments on commit 09d208b

Please sign in to comment.