mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 09:26:27 -04:00
certmgr is a tool for managing certificates using CFSSL. It does the following: - Ensures certificates are present. - Renews certificates before they expire. - Triggering a service reload or restart on certificate updates. It operates on certificate specs, which are JSON files containing the information needed to generate a certificate. WWW: https://github.com/cloudflare/certmgr PR: 256992
20 lines
1.2 KiB
Go
20 lines
1.2 KiB
Go
--- certmgr/cmd/root.go.orig 2021-07-05 13:42:49 UTC
|
|
+++ certmgr/cmd/root.go
|
|
@@ -133,7 +133,7 @@ func Execute() {
|
|
func init() {
|
|
cobra.OnInitialize(initConfig)
|
|
|
|
- RootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "f", "", "config file (default is /etc/certmgr/certmgr.yaml)")
|
|
+ RootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "f", "", "config file (default is %%ETCDIR%%/certmgr.yaml)")
|
|
RootCmd.PersistentFlags().StringP("dir", "d", "", "either the directory containing certificate specs, or the path to the spec file you wish to operate on")
|
|
RootCmd.PersistentFlags().StringP("svcmgr", "m", "", fmt.Sprintf("service manager, must be one of: %s", strings.Join(storage.SupportedServiceBackends, ", ")))
|
|
RootCmd.PersistentFlags().DurationP("before", "t", cert.DefaultBefore, "how long before certificates expire to start renewing (in duration format)")
|
|
@@ -161,7 +161,7 @@ func initConfig() {
|
|
viper.SetConfigFile(cfgFile)
|
|
} else {
|
|
viper.SetConfigName("certmgr") // name of config file (without extension)
|
|
- viper.AddConfigPath("/etc/certmgr") // adding home directory as first search path
|
|
+ viper.AddConfigPath("%%ETCDIR%%") // adding home directory as first search path
|
|
}
|
|
|
|
viper.SetEnvPrefix("CERTMGR")
|