From 82d7dc2f2a3cdc6eb117f1a6a1db7dd53373e140 Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Sat, 25 Oct 2025 14:35:13 +0300 Subject: [PATCH] feat: enhance update mode in installation script to generate missing configuration files - Added logic to check for the presence of essential configuration files during update mode. - If missing, the script now generates the necessary `bootstrap.yaml` and `gateway.yaml` files to ensure proper setup. --- scripts/install-debros-network.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install-debros-network.sh b/scripts/install-debros-network.sh index 7ee5951..5864937 100755 --- a/scripts/install-debros-network.sh +++ b/scripts/install-debros-network.sh @@ -535,6 +535,12 @@ main() { configure_firewall else log "Update mode: keeping existing configuration" + # But check if configs are missing and generate them if needed + DEBROS_HOME=$(sudo -u "$DEBROS_USER" sh -c 'echo ~') + if [ ! -f "$DEBROS_HOME/.debros/bootstrap.yaml" ] || [ ! -f "$DEBROS_HOME/.debros/gateway.yaml" ]; then + log "Update mode: detected missing configuration files, generating them..." + generate_configs + fi fi create_systemd_services start_services