10 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
6f99580f8a
config: Update dev configuration default url path
I find that I am almost always during development runs using ./run
--debug --no-daemon --server_dir=/plinth .  The daemon part is gone due
to recent changes.  But without specifying --server_dir it will run on /
and since it is not the same as production run, it change this to
/plinth.  I am assuming this also the case with other people.  So,
change the default to /plinth.  I believe this reduces the entry to
development barrier by a tiny bit.
2016-06-06 17:06:14 -04:00
Sunil Mohan Adapa
9078ec5a2b
Don't write to PID file
When running under systemd, PID is known and maintained by systemd.
Process don't have write PIDs to a PID file.
2016-05-29 21:07:07 +05:30
fonfon
125cb88336 Removed cfg.product_name entry and tests
The name 'Plinth' (cfg.product_name) is not used anymore after my previous
commits.
Reason for the complete removal: I do not think that users should know or have
to care about the internal name of the web interface of the FreedomBox.
2015-10-28 19:52:14 -04:00
fonfon
3d87c3eb3b Data types for cfg.py; add danube_edition entry
- Explicitly state datatype in config_items to handle them more
  generically

- Handle boolean values correctly.  Before this fix we got the string
  'False' which evaluated to True (this affected the entry
  'use_x_forwarded_host').

- Add the config entry 'danube_edition'. Activating it shows a voucher
  input field for pagekite accounts on freedombox.me during the
  firstboot process. Other vouchers (i.e. for VPN services) might
  follow.  Add description and test for 'danube_edition' setting.
2015-09-29 09:11:18 +05:30
Sunil Mohan Adapa
1b6969a8a6 Rethink how proxied headers are handled
- Request Apache to send X-Forwarded-Proto header.

- Use X-Forwarded-Proto header to understand original protocol
  requested.

- Use X-Forwarded-Host header to understand original host requested.

- Allow any incoming host header so that FreedomBox can have any
  hostname and when user requests for Plint with that hostname, it
  works.

- Don't depend on Apache to rewrite the Location: header.  Instead use
  the original host and original scheme to set proper Location: header.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
9e0d08e49d Move enabled modules list to configuration directory 2014-10-04 13:41:26 +05:30
Sunil Mohan Adapa
42d05bfe1f Use Django models to store variables
- Remove dependency on withsqlite and use Django models.
  This avoids depending on a module that is not available in PyPi.
  Withsqlite does not have Python3 support. It does not work when
  we choose a different database backend. Atleast partly duplicates
  what Django models are meant for.

- Check and update database schema on every run so that
  newly added modules can add tables and old ones can update.
2014-09-10 12:35:35 +05:30
Sunil Mohan Adapa
f243dfa3ab Allow running from working directory 2014-08-31 16:32:11 +05:30
Sunil Mohan Adapa
4625bc55df Remove unused user_dir config variable 2014-08-31 16:23:50 +05:30
Sunil Mohan Adapa
5ed58d6632 Rename plinth.sample.config to plinth.config 2014-08-31 13:05:21 +05:30