diff --git a/imageroot/update-module.d/11update_network_env b/imageroot/update-module.d/11update_network_env new file mode 100644 index 0000000..d271d22 --- /dev/null +++ b/imageroot/update-module.d/11update_network_env @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +# +# Copyright (C) 2025 Nethesis S.r.l. +# SPDX-License-Identifier: GPL-3.0-or-later +# + +# Set PUBLIC_ENDPOINTS if not already set + +import agent + +network = agent.read_envfile('network.env') +if 'PUBLIC_ENDPOINTS' not in network: + network['PUBLIC_ENDPOINTS'] = '/api/units/register' + agent.write_envfile('network.env', network)