mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
config: Remove Apache home page configuration from freedombox.conf
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
bedc5ff96d
commit
bd43ed515e
3 files changed
+5
-34
No files matched your search
@@ -69,6 +69,8 @@ def get_home_page():
|
||||
|
||||
aug.defvar('conf', '/files' + conf_file)
|
||||
|
||||
app_path = 'plinth'
|
||||
|
||||
for match in aug.match('/files' + conf_file +
|
||||
'/directive["RedirectMatch"]'):
|
||||
if aug.get(match + "/arg[1]") == '''"^/$"''':
|
||||
@@ -114,14 +116,11 @@ def setup(helper, old_version=None):
|
||||
|
||||
|
||||
def _migrate_home_page_config():
|
||||
"""Move the default app configuration to an external file."""
|
||||
"""Move the home page configuration to an external file."""
|
||||
|
||||
# Hold the current default app in a variable
|
||||
home_page_path = get_home_page().replace('_', '/')
|
||||
|
||||
# Reset the default app to plinth in freedombox.conf
|
||||
actions.superuser_run('config', ['reset-home-page'])
|
||||
|
||||
# Write the default app setting into the new conf file
|
||||
# This step is run at the end because it reloads the Apache server
|
||||
actions.superuser_run('config', ['set-home-page', home_page_path])
|
||||
Reference in new issue
Block a user