fix(setup): add error handling for configuration write failure and confirm successful save

This commit is contained in:
rE-Bo0t.bx1
2025-11-05 20:42:59 +08:00
parent 43cec0058f
commit c0ba79aa23

View File

@@ -401,4 +401,13 @@ DirPort $DIRPORT
# Bandwidth Limits
RelayBandwidthRate $BANDWIDTH KB
RelayBandwidthBurst $((BANDWIDTH * 2)) KB
RelayBandwidthBurst $((BANDWIDTH * 2)) KB
EOF
then
echo -e "${RED}❌ Failed to write configuration${NC}"
restore_from_backup
exit 1
else
echo -e "${GREEN}✅ Configuration saved: $CONFIG_FILE${NC}"
fi