Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ target/

# known_hosts file
known_hosts
venv/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ wssh --logging=debug
# log to file
wssh --log-file-prefix=main.log

# specify alternative location for template material
wssh --template_path=/templates

# specify alternative location for static material
wssh --static_path=/static

# more options
wssh --help
```
Expand Down
9 changes: 6 additions & 3 deletions webssh/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ def print_version(flag):
define('version', type=bool, help='Show version information',
callback=print_version)


base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
font_dirs = ['webssh', 'static', 'css', 'fonts']

define('template_path', default=os.path.join(base_dir, 'webssh', 'templates'))
define('static_path', default=os.path.join(base_dir, 'webssh', 'static'))

max_body_size = 1 * 1024 * 1024


Expand All @@ -75,8 +78,8 @@ def get_url(self, filename, dirs):

def get_app_settings(options):
settings = dict(
template_path=os.path.join(base_dir, 'webssh', 'templates'),
static_path=os.path.join(base_dir, 'webssh', 'static'),
template_path=options.template_path,
static_path=options.static_path,
websocket_ping_interval=options.wpintvl,
debug=options.debug,
xsrf_cookies=options.xsrf,
Expand Down