fix: add dnsmasq restart-on-failure override for container boot race
This commit is contained in:
parent
16b5850aa6
commit
646b708104
1 changed files with 8 additions and 0 deletions
|
|
@ -348,6 +348,14 @@ EOF
|
|||
log "NAT routing service installed"
|
||||
|
||||
# Start/enable dnsmasq
|
||||
# Add restart policy for containers (interface may not be ready on first boot)
|
||||
mkdir -p /etc/systemd/system/dnsmasq.service.d
|
||||
cat > /etc/systemd/system/dnsmasq.service.d/restart.conf << 'EOF'
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
systemctl enable dnsmasq 2>/dev/null || true
|
||||
systemctl restart dnsmasq 2>/dev/null || service dnsmasq restart 2>/dev/null || true
|
||||
log "dnsmasq restarted"
|
||||
|
|
|
|||
Loading…
Reference in a new issue