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:
13
setup/dns.sh
13
setup/dns.sh
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user