mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-12-11 07:58:50 +00:00
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.
This commit is contained in:
parent
8ba3c838e9
commit
82d7dc2f2a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user