2 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
071d61bcc8
*: Move all systemd service files from /lib to /usr
This is now the preferred location in Debian. See:

https://lintian.debian.org/tags/systemd-service-in-odd-location
https://bugs.debian.org/992465
https://bugs.debian.org/987989
d70caa69c6
https://lists.debian.org/debian-devel/2021/08/msg00275.html

Tests:

- Lintian no longer shows errors:
  E: freedombox: systemd-service-in-odd-location lib/.../calibre-server-freedombox.service

- Comparing the old .deb and newly generated .deb with these changes. All the
systemd files show that they are moved from /lib to /usr/lib/systemd.

- After upgrading the deb from older version to a version these changes,
services installed by the package are available (tested after restart with
wordpress and claibre). Services tweaked by the package have the changed
configuration reflected as shown by systemctl show
{service-name}.service (tested after restart with quassel).

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-09 22:08:50 -04:00
Sunil Mohan Adapa
2d30312b10
config: Disable rsyslog and syslog forwarding
Helps: #664.

Currently, logs are written to disk twice, once by journald and once by rsyslog.
rsyslog may log to multiple locations depending on the type of the log. To
reduce disk I/O, disable rsyslog and rely solely on systemd journal.

Place the code in config module as there is no better place for it currently
without creating a new module. Can be sorted later.

The following files under /var/log/ are no longer populated on FreedomBox. They
will be rotated away over a few days. Use journalctl instead to view the
messages:

- syslog
- messages*
- auth.log*
- debug*
- daemon.log
- kern.log
- lpr.log
- mail.log
- mail.info
- mail.warn
- mail.err
- user.log

Tests performed:

- On a machine with rsyslog running, run ./setup.py install and start FreedomBox
service. This triggers the config app's setup. rsyslog is disabled and masked.
systemd-journald is restarted.

- Even when rsyslog is unmaked and enabled manually, systemd journald does not
forward message to syslog anymore.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2021-03-05 18:06:31 -08:00