package config

import (
	"log"
	"os"
)

func (config *Config) Verify() {
	a := config.SafeLine.Verify()
	b := config.ApplyCert.Verify()
	if a || b {
		log.Printf("Configuration check complete; please review settings and rerun!")
		os.Exit(0)
	}
	log.Printf("Configuration check complete; starting certificate updates!")
}

func (config *Config) VerifyCommand() {
	a := config.SafeLine.VerifyCommand()
	b := config.ApplyCert.VerifyCommand()
	if a || b {
		log.Printf("Configuration check complete; please review settings and rerun!")
		os.Exit(0)
	}
	log.Printf("Configuration check complete; starting certificate updates!")
}
