Archived
21 lines
690 B
Bash
21 lines
690 B
Bash
#!/bin/bash
|
|
# ROLLBACK — restore daemon.json to original (no mtu field)
|
|
HOST=$(hostname)
|
|
LOG=/volume1/docker/mtu_migration/${HOST}_rollback.log
|
|
exec >> "$LOG" 2>&1
|
|
echo "[$(date)] $HOST ROLLBACK starting"
|
|
cat > /etc/docker/daemon.json << 'DAEMON'
|
|
{
|
|
"data-root": "/volume1/docker-root/",
|
|
"storage-driver": "overlay2",
|
|
"dns-search": ["."]
|
|
}
|
|
DAEMON
|
|
echo "[$(date)] daemon.json restored: $(cat /etc/docker/daemon.json)"
|
|
systemctl restart docker
|
|
sleep 15
|
|
echo "[$(date)] Docker status: $(systemctl is-active docker)"
|
|
echo "[$(date)] eth0 MTU: $(ip link show eth0 | grep -o 'mtu [0-9]*')"
|
|
touch /volume1/docker/mtu_migration/${HOST}_rollback.done
|
|
echo "[$(date)] $HOST ROLLBACK COMPLETE"
|