diff --git a/actions/ttrss b/actions/ttrss index e20c59c18..9622548b8 100755 --- a/actions/ttrss +++ b/actions/ttrss @@ -51,22 +51,24 @@ def subcommand_setup(_): for match in aug.match('/files' + CONFIG_FILE + '/define'): if aug.get(match) == 'SELF_URL_PATH': aug.set(match + '/value', "'http://localhost/tt-rss/'") + elif aug.get(match) == 'PLUGINS': + aug.set(match + '/value', "'auth_remote, note'") aug.save() action_utils.service_restart('tt-rss') - action_utils.webserver_enable('50-tt-rss') + action_utils.webserver_enable('tt-rss-plinth') def subcommand_enable(_): """Enable web configuration and reload.""" action_utils.service_enable('tt-rss') - action_utils.webserver_enable('50-tt-rss') + action_utils.webserver_enable('tt-rss-plinth') def subcommand_disable(_): """Disable web configuration and reload.""" - action_utils.webserver_disable('50-tt-rss') + action_utils.webserver_disable('tt-rss-plinth') action_utils.service_disable('tt-rss') diff --git a/data/etc/apache2/conf-available/tt-rss-plinth.conf b/data/etc/apache2/conf-available/tt-rss-plinth.conf new file mode 100644 index 000000000..41e55d71d --- /dev/null +++ b/data/etc/apache2/conf-available/tt-rss-plinth.conf @@ -0,0 +1,15 @@ +## +## On all sites, provide Tiny Tiny RSS on a default path: /tt-rss +## Allow all valid LDAP users. +## +Alias /tt-rss /usr/share/tt-rss/www + + + AuthType basic + AuthName "FreedomBox Login" + AuthBasicProvider ldap + AuthLDAPUrl "ldap:///ou=users,dc=thisbox?uid" + AuthLDAPGroupAttribute memberUid + AuthLDAPGroupAttributeIsDN off + Require valid-user + diff --git a/plinth/modules/ttrss/__init__.py b/plinth/modules/ttrss/__init__.py index e2a29ab8f..3520f4bee 100644 --- a/plinth/modules/ttrss/__init__.py +++ b/plinth/modules/ttrss/__init__.py @@ -58,7 +58,7 @@ def init(): def setup(helper, old_version=None): """Install and configure the module.""" - helper.install(['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php5-pgsql']) + helper.install(['tt-rss', 'postgresql', 'dbconfig-pgsql', 'php-pgsql']) helper.call('post', actions.superuser_run, 'ttrss', ['setup']) helper.call('post', service.notify_enabled, None, True) @@ -71,7 +71,8 @@ def get_status(): def is_enabled(): """Return whether the module is enabled.""" - return action_utils.webserver_is_enabled('50-tt-rss') + return (action_utils.service_is_enabled('tt-rss') and + action_utils.webserver_is_enabled('tt-rss-plinth')) def is_running(): @@ -91,6 +92,6 @@ def diagnose(): results = [] results.extend(action_utils.diagnose_url_on_all( - 'https://{host}/ttrss', extra_options=['--no-check-certificate'])) + 'https://{host}/tt-rss', extra_options=['--no-check-certificate'])) return results