pub fn initial_setup(
config: &Config,
rollback: &RollbackManager,
) -> Result<(), Box<dyn Error>>Expand description
Performs the initial setup of the server based on the provided configuration.
This function orchestrates the entire initial setup process, including:
- Updating the system
- Installing essential packages
- Setting up the firewall
- Configuring SSH
It creates a snapshot before starting the setup process for potential rollback.
§Arguments
config- A reference to theConfigstruct containing setup configurationrollback- A reference to theRollbackManagerfor creating snapshots
§Returns
Returns Ok(()) if the initial setup is completed successfully, or an error if setup fails.