1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-05 15:57:23 +01:00

Address issues with postgrey, nsd, and rsyslogd introduced with jammy

1. `systemctl reload postgrey` is broken, so use restart in that case
2. `systemctl restart nsd` succeeds once /var/log is writable by systemd. However, nsd still fails to write to /var/log/nsd.log if the file already exists
3. the default configuration for rsyslogd is to no longer create a /var/run/rsyslogd.pid file, so use /usr/bin/pidof in that case
This commit is contained in:
downtownallday
2022-02-25 19:45:46 -05:00
parent ad5a647d36
commit 2c6474385e
3 changed files with 36 additions and 8 deletions

View File

@@ -92,6 +92,19 @@ EOF
echo "Installing nsd (DNS server)..."
apt_install nsd ldnsutils openssh-client
# ensure nsd can write to its log file
rwpaths=$(awk -F= '/^ReadWritePaths=/ { print $2 }' /lib/systemd/system/nsd.service)
mkdir -p /etc/systemd/system/nsd.service.d
cat >/etc/systemd/system/nsd.service.d/miab.conf <<EOF
# Do not edit. Overwritten by Mail-in-a-Box setup.
[Service]
ReadWritePaths=
ReadWritePaths=${rwpaths} /var/log
EOF
systemctl daemon-reload
systemctl restart nsd
# Create DNSSEC signing keys.
mkdir -p "$STORAGE_ROOT/dns/dnssec";