diff --git a/data/etc/plinth/plinth.config b/data/etc/plinth/plinth.config index 86d7766f4..bb553e870 100644 --- a/data/etc/plinth/plinth.config +++ b/data/etc/plinth/plinth.config @@ -3,7 +3,6 @@ file_root = /usr/share/plinth config_dir = /etc/plinth data_dir = /var/lib/plinth -log_dir = /var/log/plinth server_dir = /plinth actions_dir = /usr/share/plinth/actions doc_dir = /usr/share/doc/plinth @@ -11,8 +10,6 @@ custom_static_dir = /var/www/plinth/custom/static # file locations store_file = %(data_dir)s/plinth.sqlite3 -status_log_file = %(log_dir)s/status.log -access_log_file = %(log_dir)s/access.log [Network] host = 127.0.0.1 diff --git a/data/var/log/plinth/.gitkeep b/data/var/log/plinth/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/debian/postinst b/debian/postinst index 4683d31f0..befcb3cb2 100755 --- a/debian/postinst +++ b/debian/postinst @@ -18,7 +18,7 @@ case "$1" in configure) addgroup --system --quiet plinth adduser --system --quiet --ingroup plinth --no-create-home --home /var/lib/plinth plinth - chown -R plinth: /var/lib/plinth /var/log/plinth + chown -R plinth: /var/lib/plinth if [ ! -e '/var/lib/freedombox/is-freedombox-disk-image' ]; then umask 377 diff --git a/debian/postrm b/debian/postrm index 755b5c2ee..01686de51 100755 --- a/debian/postrm +++ b/debian/postrm @@ -5,7 +5,10 @@ set -e case "$1" in purge) deluser --system --quiet plinth || true - rm -rf /var/log/plinth /var/lib/plinth + rm -rf /var/lib/plinth + + # Remove legacy directory too + rm -rf /var/log/plinth ;; esac diff --git a/plinth.config b/plinth.config index e428bd3f6..3b7c89ba3 100644 --- a/plinth.config +++ b/plinth.config @@ -3,7 +3,6 @@ file_root = %(root)s config_dir = %(file_root)s/data/etc/plinth data_dir = %(file_root)s/data/var/lib/plinth -log_dir = %(file_root)s/data/var/log/plinth server_dir = /plinth actions_dir = %(file_root)s/actions doc_dir = %(file_root)s/doc @@ -11,8 +10,6 @@ custom_static_dir = %(file_root)s/data/var/www/plinth/custom/static # file locations store_file = %(data_dir)s/plinth.sqlite3 -status_log_file = %(log_dir)s/status.log -access_log_file = %(log_dir)s/access.log [Network] host = 127.0.0.1 diff --git a/plinth/cfg.py b/plinth/cfg.py index 38f47918b..86155db6d 100644 --- a/plinth/cfg.py +++ b/plinth/cfg.py @@ -30,8 +30,6 @@ custom_static_dir = None store_file = None actions_dir = None doc_dir = None -status_log_file = None -access_log_file = None host = None port = None use_x_forwarded_host = False @@ -96,8 +94,6 @@ def read(config_path=None, root_directory=None): ('Path', 'store_file', 'string'), ('Path', 'actions_dir', 'string'), ('Path', 'doc_dir', 'string'), - ('Path', 'status_log_file', 'string'), - ('Path', 'access_log_file', 'string'), ('Path', 'server_dir', 'string'), ('Network', 'host', 'string'), ('Network', 'port', 'int'), diff --git a/plinth/tests/data/etc/plinth/plinth.config b/plinth/tests/data/etc/plinth/plinth.config index e428bd3f6..3b7c89ba3 100644 --- a/plinth/tests/data/etc/plinth/plinth.config +++ b/plinth/tests/data/etc/plinth/plinth.config @@ -3,7 +3,6 @@ file_root = %(root)s config_dir = %(file_root)s/data/etc/plinth data_dir = %(file_root)s/data/var/lib/plinth -log_dir = %(file_root)s/data/var/log/plinth server_dir = /plinth actions_dir = %(file_root)s/actions doc_dir = %(file_root)s/doc @@ -11,8 +10,6 @@ custom_static_dir = %(file_root)s/data/var/www/plinth/custom/static # file locations store_file = %(data_dir)s/plinth.sqlite3 -status_log_file = %(log_dir)s/status.log -access_log_file = %(log_dir)s/access.log [Network] host = 127.0.0.1 diff --git a/plinth/tests/test_cfg.py b/plinth/tests/test_cfg.py index 4ac85db3a..41df6a90c 100644 --- a/plinth/tests/test_cfg.py +++ b/plinth/tests/test_cfg.py @@ -115,7 +115,7 @@ class TestCfg(unittest.TestCase): """Compare two sets of configuration values.""" # Note that the count of items within each section includes the number # of default items (1, for 'root'). - self.assertEqual(12, len(parser.items('Path'))) + self.assertEqual(9, len(parser.items('Path'))) self.assertEqual(parser.get('Path', 'root'), cfg.root) self.assertEqual(parser.get('Path', 'file_root'), cfg.file_root) self.assertEqual(parser.get('Path', 'config_dir'), cfg.config_dir) @@ -125,10 +125,6 @@ class TestCfg(unittest.TestCase): self.assertEqual(parser.get('Path', 'store_file'), cfg.store_file) self.assertEqual(parser.get('Path', 'actions_dir'), cfg.actions_dir) self.assertEqual(parser.get('Path', 'doc_dir'), cfg.doc_dir) - self.assertEqual( - parser.get('Path', 'status_log_file'), cfg.status_log_file) - self.assertEqual( - parser.get('Path', 'access_log_file'), cfg.access_log_file) self.assertEqual(5, len(parser.items('Network'))) self.assertEqual(parser.get('Network', 'host'), cfg.host) diff --git a/setup.py b/setup.py index fa5b0c7b3..9bd08043d 100755 --- a/setup.py +++ b/setup.py @@ -40,7 +40,6 @@ from plinth.tests.coverage import coverage DIRECTORIES_TO_CREATE = [ '/var/lib/plinth', '/var/lib/plinth/sessions', - '/var/log/plinth', ] DIRECTORIES_TO_COPY = [