ports/security/certmgr/files/patch-certmgr_cmd_root.go
Robert Clausecker 291bf56652 security/certmgr: new port
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
2021-07-14 10:43:50 +02:00

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")